So if you move the write head, do you get a pop when the read head
passes over the transition point (e.g. where the write head moved from?

yes, if you move the write head, or stop it, or change the pre/write level, and then read over the point where you moved/stopped/changed level, you’ll get a discontinuity of course. but as you say, that’s wasy to avoid in a traditional “delay” type application, where the buffer is being addressed in a circular way and write head is generally always moving.

still, idea for lines was to allow other, arbitrary structures. disabling the write head can be fun. clearly in a sampling/1-shot or looping playback kind of situation, you want to be able to arbitrarily reset the recording position.

lines does lack a couple of features to really make these use cases convenient and glitch-free (namely fade-in/out when starting/stopping the read head, crossfading around a loop point, and preroll/postroll for accurate timing.) but there are also numerical issues with timing accuracy when using lines with BEES (control side application)… basically a tradeoff between buffer length and accuracy… and that’s a whole other can of worms.

sin/cos crossfade… linear seemed fine.

yeah, this gets more noticeable when you are constantly crossfading or “granulating” - as when using the delay system as a pitch-shifter. then you kind of really want the equal-power envelope.

you mean, interpolation when playing the buffer at a different speed than it was recorded?

yeah, that’s what i mean. of course if you are speeding up by a integer factor you don’t need interpolation, but if you are speeding up by an arbitrary factor (or slowing down at all) then you do need it. and yeah, cubic interpolation is “better” and causes less distortion, although i’m actually with you in thinking that there’s rarely a noticeable improvement from linear interpolation for live processing applications of typical material.

developing complex code on the Teensy was quite challenging, when my only debugging tools were printf

yeah, i love the teensy but that’s a big downside. i kind of don’t understand why they didn’t expose SWD/JTAG pins on the board. on aleph we actually do have JTAG exposed for both processors, so it is possible to debug the DSP. i used a gnice+ when developing the low-level framework, would have been very challenging without it. now those things are hard to come by, and the blackfin jtag header isn’t populated be default, and it’s inside the case, so it’s more convenient to forgo that path when possible. we’re gradually building out more tools to improve developer workflow (or rather, @rick_monster has been).

generally though, it’s easiest to do as much work on the PC first. rick has also made fract_math primitives and an OSC test harness for emulating DSP. i do the same kinda thing with pd externals. ususally it’s

  1. make the algo work in floating point
  2. convert to fixed point and deal with any resulting issues
  3. migrate to the blackfin (or teensy or whatever)
2 Likes

Thanks for the useful info @zebra @rick_monster I shall report back when I’ve got the board working with more memory. I think longer buffers are the key to getting the sound I’m after.

Seems like a great little module! Did you make PCBs for the teensy breakout? I’d love to build one!

1 Like

Yup, I made A PCB. It’s open source. The gerbers are the same as my previous AudioFreeze project here https://github.com/cutlasses/AudioFreeze

Very simple board which connects pots and LEDs to the teensy. I built it using the audio shield but you could probably work without that. I put eurorack power on it, but there’s no filtering or short circuit protection, and it needs 5v, so there definitely room for improvement.

I’d love to see photos if you do make one…

Thanks! That looks good. How about the music thing radio music? Could the code be adapted for that? it uses 12v and has circuit protection

1 Like

It should be possible, yeah. You should be able to re-purpose one of the cv inputs as the audio input. Not tried it myself though…

[quote=“zebra, post:14, topic:4894”]
it’s easiest to do as much work on the PC first. rick has also made fract_math primitives and an OSC test harness for emulating DSP. i do the same kinda thing with pd externals.[/quote]not anywhere near the top of your priority list but someday I’d like to see an example of this in pd compared to the migrated code

1 Like

Can’t imagine it would be super loads of work to add a pd-external build target to existing aleph modules. I probably won’t do it because pd doesn’t play nice with my tiling window manager (pulls down my system when flicking from pd to a blank desktop), so I don’t use it much! Being able to ‘make pd’ from our existing modules would be pretty cool though, as would be an aleph serial PD external. Potential for many interesting things now, having finally merged some really tricky changes dating back to April…

PD would be a much handier test environment than straight linux/jack to quickly chuck together aleph module test scenes for complex modules, because it allows to quickly hand-roll GUI for two or more module params. Whereas for my linux debug harness there’s no infrastructure for GUI elements - usually end up settling for command line oscsend incantations, hardly possible to meaningfully debug larger modules.

Really we might want a pd external target which also checks/validates module params are self-consistent. How would that work?

Maybe pd external receives param-index bangs, which trigger param-name & current-param-value bangs so you can scroll down through params with one UI element, seeing what each param is called, and current BEES 16bit value, also the displayed BEES string for that value? Haven’t done enough PD to really know if this is possible!

1 Like

add a pd-external build target to existing aleph modules

yeah i am thinking about doing this… it really wouldn’t be that hard. i would generate named methods for each parameter. but i also like your idea of having some introspection methods too (param_list [int], say) and dedicated outputs for param listings. i would also generate a (sub)patcher with sliders or whatever for every parameter.

aleph serial PD external

ok that does it, i’m working on the c serial host library today.

sorry, kinda OT. but maybe not really, since i did the exact same thing the last time i made a significiantly complex audio program for teensy. regretfully, i’m not at liberty to share that code, but it’s pretty much straightforward. the only point of minor frustration was figuring out how to make the pd side c++ friendly, but there are examples of that online.

2 Likes

You’ll probably be done before lunchtime, really not much to it…

1 Like

I’m still beavering away at this - having fun! I’ve upgraded to using the Teensy 3.6, which has more processing power, and a whopping 256k or ram, which gives me around 3 seconds of audio at 12-bit. I’m using the PCB board I designed for my AudioFreeze project which was designed for Teensy 3.2. The 3.6 is twice the length, but by crafting a tower block of female header (well 2), I was able to raise the Teensy over the height of the ribbon power connector!

With all the extra processing power the 3.6 provides I was able to create 3 separate play heads, all looping audio at different pitches which is mixed together. One plays at 1/2 speed (1 octave down), one at normal speed, and one at double speed (1 octave up). Currently the mix ratios of these are fixed as I’ve run out of knobs on my board!

Here’s a very simple demo, you can hear the acoustic sound of the guitar in this video, normally I’d want the effect to be totally wet, but it does serve to show you what the original audio is doing…

I think I’m definitely getting closer to @dspk 's video that I originally cited. Next step is to add more pots to control all the parameters, and potentially add CV control for them all. I’d like to move away from using the audio shield, as I’m not really taking advantage of the 16-bit DACs/ADCs. I’m really only using it so I can use the Teensy ADC to read the pots. I’m planning on designing a new PCB and using a PIC chip to handle all of the pots and CV interface stuff and then connect that to the Teensy via I2C, but I’ve no experience of that, so that’s a whole new adventure!

8 Likes

really neat stuff! it reminds me of some of the montreal assembly pedals, which i only recently discovered. your end result is a lovely collision of notes.

3 Likes

Cheers! Haven’t really learnt to ‘play’ it yet, as I’ve literally only just finished the code, hence only playing 3 notes! Will check out that pedal company…

Yeah I was thinking it reminded me of mode 3 on the count to five pedal. (My favorite)

3 Likes

Here’s a more up to date video of where I am with it. Still a few issues to iron out (like the background noise), but I’m pretty pleased with it so far.

I’ve written a blog post with a bit more info http://www.cutlasses.co.uk/tech/glitch-delay/

9 Likes

i2c!!! :heart_eyes: plus 20 char

1 Like

This is super cool and very inspiring – I make a lot of software stuff, but I’ve been wanting to get into using the Teensy more. Really exciting!

I’m particularly looking forward to how you use a pic over I2C to communicate with the Teensy – I’ve heard a lot of people using that method for other DIY projects and I’m super curious about it. Thanks for being willing to share!

1 Like

Thanks! It’s nice to know I’ve inspired people, as I’m always inspired by so much on this forum.

There is already a PIC chip on this module, that handles the interface side, and reads the pots. I’m hoping this should make implementing the expander module reasonable straightforward. I’ll try to write some more about the tech side of how it works soon…

1 Like

This is a very inspiring project for me too.
Just came here to say this, and that I like the music I just listened to via your website. The first two tracks were great! (I’m looking forward to listen to the other tracks when I have the time). I apologize for being off-topic though.

1 Like

Really nice sounding! I’m tempted to try to make something along these lines on Er-301. I used to perform guitar improv using something similar I built in PD many years ago, but had kind of forgotten about it.

Great work!

2 Likes