How to build a sampler with sonicbirth

Official support for: sonicbirth.sourceforge.net
Post Reply New Topic
RELATED
PRODUCTS

Post

I've downloaded Sonicbirth application and I think it's very interesting. My objective is to create a sampler instrument with this application. Is there anybody who could give me any help or guide me in how to do it? I'd be very grateful. Thanks.

Post

I'm trying to load audio files in my plug-in. Does anybody know how to do it?
Thanks a lot!

Post

Hi!
You should use both "audio file" and "audio player" element.
Put both on your window.If you want to load stereo file,put one more audio player.
Load an audio file to the "audio file" argument through "audio file"s settings window.
Connect green terminals from audio file to audio player,output to buf.
Connect audio player to output.
You should supply trig,start,end and loop to audio player argument.See audio player argument's info window.

You must decide audio file(s) to load when you are making the plug-in,not when using it.
You can say "It's NOT a sampler! It's a buffer player!". I think so.

More Help?See SB's manual(command-?) and search "audio file" or "audio player".

Post

Thanks a lot tatsf!
I've managed to create both the 'audio file' and 'audio player' elements but I need that each audio sample gets activated by a different MIDI 'note on' message.
I think that this could be done as the following:
-Insert a MIDI multi note element with one output.
-Inside, insert the audio file and audio player and connect the note to Start.
How can I make the 'note on' activate the audio player and 'note off' deactivate it? That is, I'm trying to make each key of the keyboard to activate a different audio file.
Could you help me to do this? Any ideas?
Thanks a lot for your reply.

Post

Hi!
For your purpose you may use "midi mono note" .
In its settings window,check "hold note" . Now you can get only "note-on" messages.

you need to "translate" its note(or numb) and velocity output to each audio player's trig input by building some complex logical circuits.

Post

Thanks a lot again!!
Your messages are being of great help!!
Sorry for asking so many questions but this world is new to me.
I connect each note to trig on audio player, but I don't know the difference between note and numb. I don't know where do I have to connect velocity either.
I really apreciate your help.

Post

Hi!

The note is frequency of real audio. 440[Hz] for 'A' note for example.
The numb is MIDI note number. 60 for 'C' note for example.

"Connect"? No,it's not so easy.
You need to "translate" from what the midi mono note says to what the audio player can understand.

The midi mono note outputs the last incoming note-on messages.

The audio player wants trigger (and speed , if you want to make pitched instrument).
Trigger means the sequence of values :changes zero to non-zero, then returns to zero soon for next trigger.

What you need to do are:
1,Distribute note-on message to each audio player you want to play by following to note or numb value.
--Maybe you shall use some comparator element.
2,Make trigger from note-on message.
--It's not so easy. I do'nt Know what to do exactly. Maybe delay element is available to make zero after non-zero.But there seems to be another way...

When building some complex logical circuit like this , I strongly suggest you to read all the manual and list elements that seems available.
For example, have you use "display value" element ? It's very useful to see what are going now.

Post

Thank you very much indeed!!!
I'm going to work on this and inform you about my progress!!
This project is really important to me. We'll keep in touch.

Post

Ooops!You are right and I was wrong.
You can make sampler by just "connecting" .

Use "midi note state",add note(s) as many as you want , set note,set "On value" to 1.
Connect midi note state's sta outputs to audio player's trig input.

Now you can send note-on/off to audio player.

If you need only note-on , use trigger and delay element.
Connect the sta output to trigger's r input and delay's input ,constant 0.001 (or what you like) to the dly input,delay's output to audio player's trig input.
Connect constant o.5 to trigger's tt/rt input ,constant 1 to on input, constant 0 to off input.

Now,when you hit the note the trigger's output goes to 0 for an instant,and returns to 1 soon.
does it work right? The Display OSC element can show its behavior.

If you use velocity,just multiply it to audio player's output.
Connect vel output and audio player's output to multiply's input,and multiply's output to this plug-in's output,channel 0 for example.

Post

Thank-you very much again tatsf!!!!
Sorry for not having answered before but I've been a little bit busy recently and left the project for a while. Nevertheless I have started working with it again and followed all your steps above.
Sorry for troubling you again but I have found, once more, a problem in the development:
I can't connect the delay's output to the audio player's trig input because I can only connect one wire at a time (and I had connected the midi note state's sta output to it before).
I've tried to just connect the midi mono note state's sta output to the audio player's trig input and its output to the circuit's output, but this doesn't work.
I really apreciate your help in this. Thanks a lot for all your time!

Post

Hi!
1.Every inlet can connect only one path. It seems to be SB's spec.
You have to use add,add-many,mult,max,min or other element to join signals.

2.Did you start sound server? This is the most important issue.See the manual and seach 'sound server'.
After this,you can see how the circuit works by patching display elements.

I uploaded a basic sampler circuit.
http://www.kvraudio.com/banks.php?s=dl&id=999
It's not enough(leaves some problem),but will help you.
To use this:
Set midi device and midi server.
Load wav file(attached samples or what you like) to each audio file element.
Start sound server.

Post

SUPERB!!!! I really don't know how to thank you for all your help.
I've created a subcircuit with your trigger scheme in order to insert it into each note of the midi note state element.
It's interesting to have a delay control for each note but I have substituted it for a constant element so that all notes have the same lenght.
My intention is to create a virtual instrument which works with real bagpipes sound samples. For this I'm creating a device (which could be the x/y pad element) that will be able to reproduce the normal execution of the note, triplets and other ornaments typical of this instrument, moving the pad parameters.
In order to do this I have:
-connected each note's output to two subcircuits -those which I created thanks to your scheme.
-connected the output of the first subcircuit to a multiplication element and the output of the second subcircuit to a substraction element.
-connected an X/Y pad element to the second input of both the multiplication and substraction element.
With all this I've been able to obtain the sound of only one sound file or both files at the same time, but not either one file or the other.
I think that a possible solution to this would be to connect a midi X/Y pad to the note in order to make the X position reproduce one sound sample (for instance the normal execution of the note) and the Y position reproduce another (the ornamental note).
I've uploaded the .sbc file:

http://www.kvraudio.com/banks.php?s=dl&id=1001

I really appreciate your help (once more). SonicBirth is a very interesting program!!!

Post

I just read this thread with interest.

In Sonicbirth, is it possible to create a rompler-type instrument?

My goal would be to create a rompler where I could read a multisample file and then be able to play it with effects and possibly a phrase sequencer - is this possible or is it way too much for this dev environment?

Mike

Post Reply

Return to “SonicBirth”