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.
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 …
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.
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.
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 )
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.
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…
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.