Pokitto voice for intro?

I just got my pokitto and have fired up femtoIDE and found the animation example that shows Pokitto making faces, but no voice.

Is there source available for the intro.bin that shows how Pokitto’s introduction was made? And what technique was used to make the voice?

That should not be the case. Is there an SD card inside the Pokitto? There should be.

I should clarify - I heard no voice in the femtoIDE - perhaps this is a limitation of the simulator. The intro.bin plays perfectly on the device. I was wanting to do a little mod to the intro.bin to make it more of a toy.

So is the “animation” project in PokittoLib what is used to make the intro.bin I found on my sdcard?

1 Like

Also, I didn’t put the compiled animation.bin onto the device to see if it would play, I was only listening via simulator for the compiled code. I can test that out if sound is a limitation of the simulator.

1 Like

The simulator can play back sound, but the sound is a sound file thats normally on the SD card

okay - got it - so to make the voice, you just recorded a normal sound file, used something to change the pitch/speed/etc then just play it back. It’s not synthesized or anything.

Just to make sure, do you mean emulator or simulator? The emulator can run *.bin files and simulator *.exe files (in Windows).
And welcome on board! If you feel like it, please put some notes to the introduction thread :slight_smile:
About the Introduce yourself! category

2 Likes

Ah, okay, I’m still getting my bearings. After playing with it a little more tonight it looks like I was having trouble hearing sound in the emulator. When I kicked off the simulator (.exe), I could hear the sound files play.

So if I wanted to do my own “intro.snd” file, how would I go about recording that? I’ve looked for about 20 minutes and I’m not seeing anything on how to make .snd files.

Thanks for the help all, this is such a great little console project, but it keeps me up too late. :smiley:

2 Likes

That is just raw 8-bit,mono, audio data. The sample rate depends on the setting in myproject.h. E.g. Audacity is able to produce it.

2 Likes

There are instructions here > [Tutorial] Pipes Part 4

3 Likes

That’s a great tutorial. So from that tutorial, I was able to make a .raw file that I could pass into “gb.sound.playMusicStream” as the FeelGood demo does and hear my own voice.

The next thing I’m a bit stuck on is stopping that from looping. I found

#ifdef PROJ_STREAM_LOOP
#define POK_STREAM_LOOP PROJ_STREAM_LOOP //master switch
#else
#define POK_STREAM_LOOP 1 //loop by default
#endif

in pokitto_settings.h, so I attempted to set PROJ_STREAM_LOOP to 0 in My_settings.h in my project like so:

#define PROJ_STREAM_LOOP 0

But it keeps looping in the simulator at least (not sure about on the device)

Is there a way to stop looping, or is the best bet to not play it with PlayMusicStream and instead go through the conversion process and play it with PlaySFX?

I haven’t gone the playSFX route yet, as I like the idea of just having loose sound files sitting on the SDCard that aren’t compiled into the bin, as it seems like that would allow me drastically more space for sound that doesn’t have to take up precious program memory.

Paging @FManga … Does this problem come from the new LibSound?

Another little tidbit of info - I recorded another track and it is only looping the last second or so. In the first clip, I said “Hello, my name is pokitto”, and then it looped “my name is pokitto” over and over.

in the second clip I ended with “I love you, bye”, and looped “you, bye” over and over.

In case that helps - so maybe my define is working, but there is a bug. Going to record another track with silence at the end to see if it works as a work around for now.

@SpaceCowboy850: hey, are you using the PokittoLib that came with FemtoIDE or did you pull the latest version from github? The last FemtoIDE release didn’t use LibAudio yet.

I’m using whatever is in FemtoIDE. I haven’t pulled a new PokittoLib. I pulled FemtoIDE earlier this week.

Looping define did work previously.

Hmm. I guess one option would be to get the playhead index and stop the sound manually

I need to take a look

Right now it is working by just adding a second or two of silence at the end of the clip

1 Like

I am not sure what code you are using but when using LibAudio, I do this:

File soundEffectFile;

if (soundEffectFile.openRO("music/xxx.raw") {

    auto& music = Audio::play<0>(soundEffectFile);
    music.setLoop(false);

}
1 Like

It was the feelsgood example in pokkitolib/examples in the latest femtoide, but I’ll try your way a an alternative, thanks!