20 Jun '13 - 11:18 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: 1 ... 22 23 [24] 25 26 ... 37
  Reply  |  Print  
Author Topic: BASS for iOS (iPhone/iPad)  (Read 115674 times)
einsteinx2
Posts: 61


« Reply #460 on: 13 Apr '12 - 22:59 »
Reply with quoteQuote

Ian, are there any plans for MusePack and WavePack plugin support for the iOS version of BASS? I've had a few user requests for that functionality. Was wondering if there was any technical reason that all of the BASS plugins aren't supported on iOS. Couldn't the OS X dylibs just be compiled as static libs or is there more to it than that?
Logged
iancast
Posts: 27


« Reply #461 on: 15 Apr '12 - 19:54 »
Reply with quoteQuote

Ian, are there any plans for MusePack and WavePack plugin support for the iOS version of BASS? I've had a few user requests for that functionality. Was wondering if there was any technical reason that all of the BASS plugins aren't supported on iOS. Couldn't the OS X dylibs just be compiled as static libs or is there more to it than that?

Check the package in the first post, it contains the bassflac and basswv (WavPack) plugins. I can't find the MPC plugin though.
Logged
einsteinx2
Posts: 61


« Reply #462 on: 15 Apr '12 - 21:46 »
Reply with quoteQuote

Oh ya I forgot the WavePack plugin is in there already, I guess just MusePack then. Unless the WavePack plugin also supports that, I actually haven't tested that yet.
Logged
Ian @ un4seen
Administrator
Posts: 15366


« Reply #463 on: 16 Apr '12 - 14:55 »
Reply with quoteQuote

Ian, are there any plans for MusePack and WavePack plugin support for the iOS version of BASS? I've had a few user requests for that functionality. Was wondering if there was any technical reason that all of the BASS plugins aren't supported on iOS.

In most cases, there are no technical reasons to prevent an add-on being ported to iOS. They're basically ported on an as needed/requested basis Smiley

As iancast mentioned, the BASSWV add-on is included in the main BASS package, but an iOS version of the BASS_MPC add-on is now also up in the 1st post. If you would like to use it via the plugin system, that can be done in the same way as described for the BASSFLAC/WV add-ons in the 1st post, like this...

extern void BASS_MPCplugin;
BASS_PluginLoad(&BASS_MPCplugin, 0);

The BASSWV add-on has also been updated to the latest stuff (2.4.3).
Logged
Jnyang
Guest
« Reply #464 on: 21 Apr '12 - 05:49 »
Reply with quoteQuote

In most cases, there are no technical reasons to prevent an add-on being ported to iOS. They're basically ported on an as needed/requested basis Smiley

How about Monkey's Audio(APE)? I've also had some requests for supporting APE format, so I should be greatly indebted if you would provide the iOS plugin. Smiley
Logged
Ian @ un4seen
Administrator
Posts: 15366


« Reply #465 on: 23 Apr '12 - 14:51 »
Reply with quoteQuote

As requested, an iOS version of the BASS_APE add-on is now up in the 1st post. The C++ standard library is required, so your project's "Other Linker Flags" setting should include "-lstdc++". If you would like to use it via the plugin system, that can be done like this...

extern void BASS_APEplugin;
BASS_PluginLoad(&BASS_APEplugin, 0);
Logged
fulbert
Posts: 6


« Reply #466 on: 26 Apr '12 - 09:53 »
Reply with quoteQuote

Does the base bass lib for IOS support AAC+ or is a AAC plugin needed to support AAC+?
Logged
Ian @ un4seen
Administrator
Posts: 15366


« Reply #467 on: 26 Apr '12 - 15:44 »
Reply with quoteQuote

iOS provides an AAC+ codec that BASS can make use of, so an add-on is not required for that.
Logged
einsteinx2
Posts: 61


« Reply #468 on: 26 Apr '12 - 21:49 »
Reply with quoteQuote

Wow thanks Ian, my users will be very happy to see the MusePack support.
Logged
Delphinus
Posts: 39


« Reply #469 on: 30 Apr '12 - 15:43 »
Reply with quoteQuote

Hi,

I try to use BASSMIDI to play note so I use BASS_MIDI_StreamCreate. I searched on others threads about how to play some note but I can't find out what's wrong. Here's the code:


     BASS_Init(-1, 44100, BASS_DEVICE_LATENCY, 0, NULL);
   
    BASS_SetConfig(BASS_CONFIG_UPDATEPERIOD,10);
    HSTREAM testStream = BASS_MIDI_StreamCreate(16, BASS_MIDI_NOFX, 44100);
    if (testStream == 0)
        NSLog(@"testStreal failed %d", BASS_ErrorGetCode());

    BOOL val;
    val = BASS_MIDI_StreamEvent(testStream, 0, MIDI_EVENT_NOTE, MAKEWORD(60, 100));
    if (val == FALSE)
        NSLog(@"STREAM EVENT FAILED %d", BASS_ErrorGetCode());// press the key
    [NSThread sleepForTimeInterval:2.0];
    val = BASS_MIDI_StreamEvent(testStream, 0, MIDI_EVENT_NOTE, 60);
    if (val == FALSE)
        NSLog(@"STREAM EVENT FAILED %d", BASS_ErrorGetCode());
    if ((BASS_ChannelPlay(testStream, FALSE)) == FALSE)
        NSLog(@"testStream Play Failed %d", BASS_ErrorGetCode());


When I press a button in my app it calls this code. Then I hear nothing and there's no error. Any Idea?
Logged
Ian @ un4seen
Administrator
Posts: 15366


« Reply #470 on: 30 Apr '12 - 17:29 »
Reply with quoteQuote

You don't appear to be providing a soundfont for BASSMIDI to use there. If you don't currently have any soundfonts, an example "Chorium" soundfont can be found on the BASS webpage. If you include that in your app's resources, you can tell BASSMIDI to use it like this...

const char *sf2file=[[[NSBundle mainBundle] pathForResource:@"ChoriumRevA.SF2" ofType:nil] UTF8String]; // get soundfont filename
BASS_SetConfigPtr(BASS_CONFIG_MIDI_DEFFONT, sf2file); // set it as the default soundfont

You should also move the BASS_ChannelPlay call to before the BASS_MIDI_StreamEvent calls. With the code as it is currently, the note is already released when playback begins Smiley
Logged
Delphinus
Posts: 39


« Reply #471 on: 30 Apr '12 - 17:52 »
Reply with quoteQuote

Ok thanks that works ^^.
Logged
Delphinus
Posts: 39


« Reply #472 on: 2 May '12 - 11:04 »
Reply with quoteQuote

Is it possible to generate our own sound like sine/square/sawtooth wave and apply different MIDI effect like MIDI_EVENT_MODULATION and some FX effects too in a stream?
Logged
Ian @ un4seen
Administrator
Posts: 15366


« Reply #473 on: 2 May '12 - 16:22 »
Reply with quoteQuote

Do you want to use custom generated samples in MIDI playback, or do you just want to apply effects to a custom generated sound? It isn't currently possible to use custom generated samples with BASSMIDI (unless you also generate an SF2 soundfont structure around them), but if you just want to apply effects to a custom generated sound, you could do so either within your STREAMPROC function (ie. apply the effects as you generate the sound) or via a DSPPROC function (see BASS_ChannelSetDSP). BASS_ChannelSetFX is also available, in case you want to apply any of the ready made effects provided by BASS or BASS_FX.
Logged
Delphinus
Posts: 39


« Reply #474 on: 3 May '12 - 09:21 »
Reply with quoteQuote

Finally, I just wanted to apply effects to a custom stream, I'll use BASS_ChannelSetFX. And if I want to apply an effect that is not already made by bass I have to do it via a DSPPROC function right?
Logged
Ian @ un4seen
Administrator
Posts: 15366


« Reply #475 on: 3 May '12 - 17:28 »
Reply with quoteQuote

Yep. Another option is to apply the DSP in your STREAMPROC function, rather than a separate DSPPROC function.
Logged
Delphinus
Posts: 39


« Reply #476 on: 3 May '12 - 17:55 »
Reply with quoteQuote

I have another question (again xD).

I'm looping in a very short period of time (like 6k bytes difference) a file, then during that loop I apply pitch shifting. The problem is that the higher I increase the pitch the more the sound gets chopped.

I tried to changed BASS_CONFIG_BUFFER but if I set a high value the effect takes time to be applied. So I don't know which parameters I have to modify to get rid of that choppy sound. Ideas?

Regargind FX effects, I don't really know how all those effect works, which parameters modified what in the signal but I tried to apply multiple effect like phaser, autowah with pitch shifting and the sounds is breaking up sometimes when I increase pitch. Seems like the app doesn't manage to handle all these stuffs
« Last Edit: 4 May '12 - 13:59 by Delphinus » Logged
Ian @ un4seen
Administrator
Posts: 15366


« Reply #477 on: 4 May '12 - 14:49 »
Reply with quoteQuote

Please confirm how you're looping the file and applying the pitch change, ie. post the code Smiley

Meanwhile, the latest BASS version (2.4.9) is now up in the 1st post.
Logged
Delphinus
Posts: 39


« Reply #478 on: 4 May '12 - 14:56 »
Reply with quoteQuote

if ((BASS_Init(-1, 44100, 0, 0, NULL)) == FALSE)
    {
        NSLog(@"BASS INIT FAILED %d", BASS_ErrorGetCode());
        return NO;
    }
    const char *fileName=[[[NSBundle mainBundle] pathForResource:@"voixeric.wav" ofType:nil] UTF8String];
    chan = BASS_StreamCreateFile(0, fileName, 0, 0, BASS_STREAM_DECODE | BASS_STREAM_PRESCAN | BASS_SAMPLE_FLOAT);
    if (chan == 0)
    {
        NSLog(@"StreamCreateFile failed %d", BASS_ErrorGetCode());
        return NO;
    }
    chan = BASS_FX_TempoCreate(chan,  BASS_FX_FREESOURCE);
    if (chan == 0)
    {
        NSLog(@"TempoCreate failed %d", BASS_ErrorGetCode());
        return NO;
    }
    return YES;

void CALLBACK LoopSyncProc(HSYNC handle, DWORD channel, DWORD data, void* user)
{
    DWORD pos = BASS_ChannelGetPosition(channel, BASS_POS_BYTE | BASS_POS_DECODE);
    NSLog(@"Loop Sync Get pos %u", pos);

    BASS_ChannelSetPosition(channel, STARTLOOP, BASS_POS_BYTE | BASS_POS_DECODE);
    
    pos = BASS_ChannelGetPosition(channel, BASS_POS_BYTE | BASS_POS_DECODE);
    NSLog(@"Loop Sync Set pos %u", pos);
}

- (void) setSync
{
    sync = BASS_ChannelSetSync(BASS_FX_TempoGetSource(chan), BASS_SYNC_POS, ENDLOOP, (SYNCPROC *)&LoopSyncProc, 0);
    if (sync == 0)
        NSLog(@"SYNC FAILED %d", BASS_ErrorGetCode());
}

- (void) Play
{
    if ((BASS_ChannelPlay(chan, FALSE)) == FALSE)
        NSLog(@"Play channel failed %d", BASS_ErrorGetCode());
    
}


I call setSync then the play function. The looping code works. Then depending on where I touch the screen in x it modifies the pitch so I just call BASS_ChannelSetAttribute(chan, BASS_ATTRIB_TEMPO_PITCH, value) where value is the x value
« Last Edit: 4 May '12 - 15:00 by Delphinus » Logged
Ian @ un4seen
Administrator
Posts: 15366


« Reply #479 on: 4 May '12 - 16:10 »
Reply with quoteQuote

Thanks. The main thing I was looking for is the BASS_ChannelSetSync call, and that looks fine; the BASS_SYNC_MIXTIME flag should be used there for looping purposes, but that's automatic with "decoding channels" (like the tempo source). Are you sure the problem is only happening with short loops? For example, do you hear different results if you extract the short loop from the original file and create a new file with multiple copies of it, and then loop that larger file? Also, does the problem happen with any BASS_ATTRIB_TEMPO_PITCH setting, or is it more with larger ones? I think larger pitch/tempo adjustments can result in artifacts.
Logged
Pages: 1 ... 22 23 [24] 25 26 ... 37
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.18 | SMF © 2013, Simple Machines