about the Tape feature
so, the Tape class is intended to be spuer simple and not have tons of features
that said, there are a few features i should be able to add easily:
-
looping. it has been asked about many times; it was in 1.x and ommitting it was my bad. i promised to implement it 1month ago and haven’t yet, i’m sorry. [see note #1]
-
pause.
-
(borderline) seek.
-
(borderline) option to record inputs as well as outputs.
(each of these features is straightforward in itself, but when i sat down with a bit of free time last weekend, i realized i would have to do a more thorough refactor of the Tape class (again - last 2 times were adding envelopes, and adding more buffering to deal with norns emmc R/W speeds), to make envelopes smarter (begin fadeout before EOF), to re-prime the disk read buffer, &c - and to do all this without making a spaghetti mess. i may be able to do it this weekend. (i’ll have a few hours downtime tonight.))
features i will definitely not be implementing:
-
overdub
-
multiple tracks
-
rate modulation
-
resampling [see note #2]
all of these require specific and more or less complicated architectural descisions. if we wanted to make a more fully featured headless DAW kind of project, it would be best to break that out to a separate codebase / jack client, and start over with specifying the final desired feature set, so that the correct decisions/components can be made/implemented from the beginning. (but TBH i don’t think making a DAW is really on the critical path for norns development, and at that point i’d consider just using one of the many such projects that already exist for linux.)
anyway the Tape class is not very complicated, and it’s right here if anyone wants to contribute - that would be very nice, and would leave me to attend to other norns infrastructure issues in my not-copious free time:
[ https://github.com/monome/norns/blob/master/crone/src/Tape.h ]
notes:
[1] this form of looping will not be super accurate. Tape is a disk-streaming class and we have not added fancy features like ping-pong streaming buffers. so looping will involve 1) automaticaly beginning a fadeout when we are close to EOF, 2) waiting for fadeout, 3) seeking to SOF, 4) waiting a small but arbitrary time while the disk input buffer is re-primed, and 5) beginning playback and fade-in.
sample-accurate looping from RAM can be performed with relative ease from SuperCollider or softcut.
[2] Tape can accept any sample format supported by libsndfile, but resampling on the fly is both effortful and CPU-intensive. simply prepare your samples at 48khz. if you aren’t familiar with ffmpeg or sox this is a great opportunity to become so.