Sampler for Zynthian


#1

Hi every one!

I came here because I wanted something like op-1 but dont have money to buy one.
Does anyone here have any idea how many lines of code it would require to program audio sampler like in op-1 for Raspberry pi?
If you are not familiar with it, it can record, edit and map samples to keyboard. Also you can choose playback mode like play whole sound when key is pressed or only while key is pressed and change play speed.

I am fairly new to python and other languages. My strongest language is one used to program arduino and that is not super great but I can get stuff done if there is somekind of information about things I am doing. I have partly programmed evolutionary neural network in python but that project is still unfinished. (I was following ludobots course in reddit.)

I tried to quickly look around internet and there seems to be something called mpgedit which seems to do editing of audio files like I would like to do it. I have not tested it but from screenshot it seems that you can choose which part of audio file to play.

Here is list of features I would like the sampler to at least have:
-Record audio from audio input.
-Map samples to keyboard.
-Play audio backwards.
-Change speed in which audio is played.

If this is not super challenging and I could get little bit of guidance where to look for information I would start this project as soon as I have finished my Zynthian. I would like to do this in python.


#2

Hi @Aleksi!

Perhaps it’s simpler to use & extend some existing software. My first suggestion is “samplv1”, that is currently supported by Zynthian as a LV2 plugin under MOD-UI. Take a look to this software. You can install it in your desktop PC (Linux and perhaps Mac also) and give it a try … :wink:

Regards,


#3

@jofemodo
I am trying to install samplv1 but I dont quite get it. Could you or someone else walk me trough installation process?
I have Windows 7.


#4

Windows 7 is not a good system to install this kind of stuff.
I can’t remember the last time i used Windows … perhaps 1994? ;-DD

Sorry, i can’t help you with this installation :wink:

Regards,


#5

Well I have Raspberry pi 2 and tried to install samplv1 from sourceforge but it got aborted for some reason. Maybe abortion was because of I dont have external memory on pi.


#6

Don’t need to install from sourceforge. It’s in the Debian/Raspbian repositories :wink:


#7

I tried to install it with apt-get install samplv1 and it failed also. I will try again and tell you what the error message says.

edit.
It says that it is unable to locate samplv1


#8

Why don’t you download a Zynthian SD image? It’s installed and working out-the box? :wink:

Regards,


#9

I thought for some reason that it does only work with Raspberry pi 3. I will go and install it.

Edit. There seems to be no seeders for torret files.

Edit2. Those were old SD images I tried to download. Now downloading right one. It seems to take many hours. Good time to install screen to my pi.


#10

I succesfully installed SD image to SD card but now I see Zynthian logo with error text. Did I need soundcard so that I can use Zynthian? I dont have one yet.


#11

Hi @Aleksi

For writing sound generators you will have to use something like C/C++. Python will not work because it is “a kind of interpreter language” and you may get realtime problems. If you have some skills in programing for Arduino: that’s the right way. But for generating sound you have to learn how to do things in realtime and how to optimize algorithms. It is not impossible but you have to have in mind that learning about this takes some time (ok, for you a weekend, like KiCAD :joy:)

As @jofemodo wrote: There are some nice plugins around for learning how it works. On Zynthian we use LV2 plugins. LV2 is a kind of standard like VST in the Windows world. Another option is to write a client which uses Jack directly. But this has some drawbacks: With LV2 it is easier to create chains of effects and combine them.

Another way for working with samples: Linuxsampler (have in mind that they have an own license model!). Linuxsampler can be compiled as an LV2 plugin and has an own description language for loading samples (Akai and other formats). I have Linuxsampler on my to-do list, but currently no time.

If you have questions, don’t hesitate to ask.

Regards, Holger


#12

Wow thanks for reply C0d3man!

Good to know that I need C/C++ not python so that I dont start project that cannot be finished.

I will look into how to do things in realtime with C/C++, LV2, Linuxsampler and algorithms. I always wanted to work with algorithms.

It is only a plus if it takes time. I like to work with hard projects that challenge me.

If I cannot finish this now maybe I can after I have degree in computer science.(I am trying to get to University of Helsinki next year trough MOOC.)

I will come back with lot of questions after some time. Thank you for willingness to help!


#13

The “easiest” way to create a LV2 plugin is to use LVtk and think in buffers of n bytes (where n is given by the audio engine, e.g. 128 bytes). You have some methods where the run()-method is the major one: here is the calculation done. A very nice example is beep which is only generating a beep triggered by a MIDI note event.

A very nice source of DSP functions is MusicDSP. Here you will find code for every kind of algorithms for EQs, compressors, generators, … enough stuff for some weeks/days/years/decades… :smile:

Regards, Holger


#14

I.MUST.NOT.CLICK.ON.THOSE.LINKS. :smiley:

(I have no time to play with another programming toy :D)


#15

enough stuff for some weeks/days/years/decades…

I always wondered what I am going to do with rest of my life. :smiley:


#16

:imp: Sorry, forgot to add a disclaimer…

Do you need more links? I have about 20 more of these :joy:

Just be sure to NOT CLICK ON MUSICDSP!!! (also it’s currently 509 :joy:)


#17

NO THANKS! Unless you want to take over some of my hardware integration tasks at job and give me some spare time… :stuck_out_tongue:


#18

I have looked into what I would need to learn in order to be able to program software I would like to have and think that it would take too long for me to do it now. MOOC I mentioned starts in next years january and I have heard that it is challenging and time consuming.
I will read about subjects that are related to this project during next month but I will not start it. I probably start this project after MOOC which is in may unless I find free time at my hands during MOOC.


#19

buying an op-1 is definitly cheaper :slight_smile:


#20

I’m pissed I sold my op1