eh2k / squares-and-circles

squares-and-circles is an alternate firmware for the Eurorack module O_C, targeting Teensy 4.
https://eh2k.github.io/□●/
166 stars 12 forks source link

BETA TEST - FEEDBACK #1

Open eh2k opened 2 years ago

eh2k commented 2 years ago

WORK-IN-PROGRESS: At the moment where are not all engines in this repo. Feel free to leave me a message / feedback or any hints in this issue. More engines will follow.

HINT:

If the POGO Pin is soldered - cover the bottom of the teensy with insulating tape - all other pins are compatible with T4 to T3 (see pjrc). Be careful with connecting USB and power at the same time - if you have VIN/VUSB connected.

POGO Pin: https://www.modwiggler.com/forum/viewtopic.php?p=2867702#p2867702

FIRMWARE:

WebFlasher

modularev commented 2 years ago

Hey there! first of all, absolutely appreciate the work you've put in here! An amazing use of existing hardware and the GUI is very well thought-out, love the menu system and visualization of values.

some things I'd be very happy to see (possibly as settings or simple defines in the source-code?):

eh2k commented 2 years ago

@modularev thank you for the first feedback. I have reduced the "long-press-duration" duration from 1s to 0.5s in the latest_firmware. At the moment I trying to avoid hardwarespecific settings in the "application" layer. The "Engine::OnEncoder" method is overridable - I think I have to introduce long-press there - e.g. for resting to defaults...

djdoz commented 2 years ago

Is there a way to calibrate the knobs as mine seems to be in the opposite direction? I recall in the ornament and crime this is in the calibration menu.

djdoz commented 2 years ago

Also, for mine ... Channel 2 CV is sequencing the v/oct of Channel 1. Also, how do you get the reverb machines to work? Do you patch the sound into one of the channel inputs?

eh2k commented 2 years ago

Hello @djdoz, thank you for your feedback. I have added a "hardware setup procudurce" in the latest firmware. You can change the encoder direction and test also your CV inputs there. "AUDIO_PROCESSOR" Machines like "Reverb or Resonator" are getting the audio input from the "left" neighbor machine. The output from the neighbor will be replaced, so you can have stereo output (like a Insert-FX). The CV-input can be setup-ed as "aux-input" to patch additional signal into the audio-processors.

wtkdwc commented 2 years ago

hi, very interesting project, made me finally utilise my abandoned t4:) I would like to ask about current/future midi implementation, having cc control over all parameters could nicely compensate the lack of jack inputs. Also noticed that in models where is not the same amount of parameters on each side, like m-osc/resonator, you can click with the right encoder to empty space - that should probably cycle just between the 2 available.

eh2k commented 2 years ago

Hello @wtkdwc, thank you for your feedback. I did some midi refactoring in the latest firmware - check: https://github.com/eh2k/squares-and-circles#midi-control. Have also to fix the "empty-parameter-selection-state" - well noticed ;-).

djdoz commented 2 years ago

Thanks @eh2k for the quick turnaround!

One question, in the TR/CV test screen, I'm seeing the below values, TR0 0 CV0 +0.06V TR1 0 CV1 +0.04V TR2 0 CV2 +0.04V TR3 0 CV3 +0.02V

Is it possible to calibrate the CV values?

eh2k commented 2 years ago

Hello @djdoz - sorry - there is no callibration at the momenent (but in my todo list).

naught101 commented 2 years ago

Haven't had a chance to try this yet (teensy 4.0 on the way!), but just wanted to throw in there that a macro control that could map the CV in to arbitrary other params for each machine would be killer.

Also, a copier that allowed any copies to share params (e.g. so you could have 4-oscs with pitch and 3 other params modifiable by CV).

eh2k commented 2 years ago

Hello @naught101 - cv is V/OCT per default, but can also be modulation to any parameter of the track or as audio-aux for effects.(https://github.com/eh2k/squares-and-circles#machine-config-per-track).

As I understand the "copier" is like a "single cv modulating multiple parameters across tracks" ?

naught101 commented 2 years ago

@eh2k:

For the first part, what you're describing is assignable CV. What I'm suggesting is a way to make a macro/superknob that modfies any/all other params by some arbitrary amount, e.g. with M-OSC, maybe you could have:

Where each param's first value is set in the current config screen, and the macro coefficient is set in a macro screen. This would make it possible to use CV to get much more diverse modulation.

Yes, the copier idea would be basically that there are 2-4 copies of this track/machine that share 2-4 CV-parameter assignments, but each parameter's base value (CV=0) can be independently set per track/machine.

wtkdwc commented 2 years ago

@naught101 @eh2k maybe more manageable would be adaptation of modulation config from mk2 analog elektrons, where you have page for each cv in with up to four targets (machine+parameter) and attenuverter for each of these modulations

naught101 commented 2 years ago

Yes, @wtkdwc that sounds like a much better suggestion that could encompass both of mine in one feature.

eh2k commented 2 years ago

@wtkdwc @naught101 thanks for the suggestions - cv-macro-modulation is definitively in the todo-list.

fxwiegand commented 2 years ago

Thanks for this awesome new firmware! Really appreciate the work going into this.

Would it make sense to mark the stereo machines in the menu somehow? When i first tried out the clap i thought something broke because the kick i had on the other channel obviously stopped playing. I figured that the clap is stereo quite quickly and probably should have taken a look in the manual. On the other hand putting (stereo) behind the corresponding machines shouldn't be a problem right? 😊

eh2k commented 2 years ago

hello @fxwiegand, thank you for your feedback. Stereo makes the whole thing a bit complicated - on the other hand it's really nice especially with effects. I think the whole thing would be more self-explanatory - if it was visible somehow - maybe a small icon in the corner. I think the clap behavior is still a bug. Actually only fx-engines should overwrite the neighbour signal. I think non-fx engines should logically become mono (if the neighbor is not free).

wtkdwc commented 2 years ago

@eh2k thanks for update, nice to see the progress, have to try the midi:) btw is there some parameter in the platformio to build it with display upside down, as was flip_180 in o_c?

eh2k commented 2 years ago

Hello @modularev, @djdoz, @wtkdwc, @naught101, @fxwiegand

I have just uploaded a new squares-and-circles version.

The highlight are the modulations - I think this brings the whole thing to a new level.

If you hold down the encoder the modulation popup is shown for the selected parameter. At the beginning I wanted to implement only the CV-voltage as source, but I quickly got the idea to use the triggers for sample-and-hold, and then only the trigger for generating random values. I'm currently trying to see if I can push the randomness even further - it's a pity that the number of parameters is limited. I hope the whole thing is still understandable and not overcomplicated. Beside the selection of the modulation source there is only one parameter (attenuverter).

New modulations can be added in the code similar to the engines (https://github.com/eh2k/squares-and-circles/blob/main/src/modulations.cxx).

I also changed the logic of the config page. Now you can select any TRIG-Inputs or CV-Inputs for an engine/track. So you can e.g. pass the V/OCT signal for all 4 engines with one CV-input.

On the top right you can see which outputs are used by the engine.

The whole parameter logic was also refactored. I hope I didn't add any new bugs.

I think I have to make another youtube video - demonstrating the modulations.

I wish you a lot of fun with the firmware - and a nice weekend.

angiamusic commented 2 years ago

Hey!

Just wanted to say that I've been having an absolute blast with Squares And Circles!! I made a little jam/cover and used this for the drums, would be nice if you could give it a listen :D https://www.youtube.com/watch?v=3MqSL9IBduc

I look forward to trying out this new update. Also, knowing CV calibration is on the horizon is reassuring.

The only issue (outside of CV tracking) that I've been facing with the firmware is that I can't for some reason use drum sounds on both channel 0 and 1; loading a drum engine on channel 1 mutes channel 0 and I don't know how to avoid that... But its still an amazing firmware nonetheless!

Looking forward to seeing all the progress! :D <3

eh2k commented 2 years ago

@angiamusic, thanks. I have watched your jam - nice! - it is funny - I could swear I also hear the synths, although you say you used it only for drums!

I think the issue you are describing "stereo handling non fx tracks" is already fixed in the latest firmware.

djdoz commented 2 years ago

Just had a play with the new firmware, the randomisation is really a nice touch, especially on drums to give it a bit of variation.

eh2k commented 2 years ago

For me personally, random modulation is more useful in practice than CV. Thinking a little further, I think a small sequencer with variable step lengths (Randuencer ©) that can be assigned to the parameters as modulations would make the whole thing even more interesting.

adh82 commented 2 years ago

@eh2k Just got this up and running. Its amazing!!! Thanks for your hard work on this. Im very much looking forward to having calibration implemented as I'm having some trouble with pitch when using oscillator engines. The drums are so good though. Wondering if it would be possible to have a level control for all the drum engines? Also would it be possible have a mixing option to allow engines to choose an output? Id love to be able to set up a multi oscillator or a set of drums and have the come out of one output. Lastly I have 2 o&C's and they sit side by side. I can see with your firmware the screen brightness is much lower that the original firmware. Is this possible to adjust?

eh2k commented 2 years ago

@adh82, thank you for your feedback.

djdoz commented 2 years ago

@eh2k, do you think it is feasibile to import the Befaco Noise Phetora algorithms as machines in squares & circles?

eh2k commented 2 years ago

@djdoz

I have just looked at the source code of befaco. Unfortunately, the algorithms are based on the Teensy Audio Library and are distributed under GPL. The sound generation is not completely digital, and would probably be rather unspectacular on the OC without the additional analogue filters.

Theoretically, it should be possible to use the Teensy Audio Library in some way (implement a class based on AudioStream or AudioConnection). You just have to redirect the AudioStream frame-wise into the buffer array in the engine-process-method. But it could be difficult, because of DMA, the whole timing and dependencies to other libraries.

At the moment, for example, all algorithms/engines are hardware-independent and can also be run on a PC (for testing purposes, etc.). With the Teensy Audio Library, this would IMHO no longer be possible.

At the moment I try to avoid GPL code, because I want to keep the option - to make "closed source" engines possible. I think the trend is more towards contributing with e.g. small closed-source "free-ware" engines instead of completely "open sourcing" the algorithms.

djdoz commented 2 years ago

@eh2k thanks for looking into this and the detialed response.

eh2k commented 2 years ago

Hello all,

after some work I want to slowly finish the beta phase, and share the release candidate version with you.

Besides the setup procedure (ADC/DAC calibration and display settings) I have mainly extended and optimized the modulations.

Modulations are now instantiated for each parameter individually - i.e. envelope or LFO with individual frequencies and settings per engine parameter are possible.

Two new FX engines have been added ( Gated-Reverb, Reverb-HP-LP - the algorithms are based on FV-1 emulation ). It is now also possible to virtually mix the input signal of an FX engine from different engines.

Furthermore I have extended the documentation / readme.

I hope there are no new bugs added so far - it is really time-consuming to test the whole thing. I would be pleased for simply reporting back here that e.g. the calibration worked. I have only one module, where I have modded the DAC output to -5V/+5V lately.

djdoz commented 2 years ago

Wow, nice update! Will give this a try.

So, it is possible to port SPIN FV-1 algos onto this now? Does it support both mono and stereo effects?

Also, do you calibrate the module first and then perform the -5V/+5V mod or the other way around? And how would you verify that the -5V/+5V is working. I've triggered some sounds without the mod and by monitoring the waveforms on an oscilloscope it seems like it rarely exceeds -3V/+3V.

eh2k commented 2 years ago

@djdoz

Perhaps "based on FV-1 emulation" is misleading. The algos must be compiled, and can be "linked" as static libs. (similar to faust, but this is a another project by me so far). The effects are stereo.

You have to callibrate again after modding. I think you can use the CV|V/OCT Engine to verify the voltage on the output with a multimeter. Or using a OSC|Waveforms and increasing the output-gain would show the maximum/distortion on an oscilloscope.

oldmanfury commented 2 years ago

I got mine up and running yesterday - great fun! So happy that you released an update with calibration. I ran through the cal procedure - worked great.

Question - I want to use USB midi - normally for an arduino, you select serial-midi or something like that when you compile. Is there a way to do this with the .hex file and the teensy loader?

eh2k commented 2 years ago

@oldmanfury

Thank you for your feedback.

You can define build_flags in the platformio.ini file. Currently there is USB serial active: build_flags = -DUSB_SERIAL. Theoretically you could change the Flag to USB_MIDI, and pushing the byte stream from USB to the machine::midi_handler->midiReceive(). The initialization should be done in the main function. I think you still have to set the TR1 to midi in the IO-Configuration, so it should no matter the byte stream coming from TR1 or USB. Feel free to open a new Issue for this. (At the moment I am not planning to support USB midi)

adh82 commented 2 years ago

I was just wandering if i2c control would be possible to implement? Could see this being super fun with the Monome Teletype and the disting EX ops.

https://llllllll.co/t/teletype-disting-ex-integration/33929

n0ahg commented 2 years ago

I was just wandering if i2c control would be possible to implement? Could see this being super fun with the Monome Teletype and the disting EX ops.

https://llllllll.co/t/teletype-disting-ex-integration/33929

Hardware mod on a software alternative? Serioulsy though I'm looking at what I can add to the EuroPi when I can get the components to build one. Looking at i2c rotary encoders, sliders, etc.

eh2k commented 2 years ago

Hello @adh82, @n0ahg

A note in advance - a control via midi on the TR1 is implemented - although I must honestly say that I do not use this at all lately.

Regarding i2c control - there are still various pins on the back of the Teensy 4.0 - but it is not so easy to connect them. If you had e.g. the second SPI port - besides control e.g. additional peripherals like ADC, DACs or a communication with another controller would be possible. Alternatively it is possible to put a Teensy 4.1 instead of the 4.0 on it - with that e.g. an uO_C expansion module on the left side would be conceivable - Teensy 4.1 is generally interesting for me because of the additional RAM, the USB host connection as well as the SD card.

Further conceivable hardware mods: I thought about leaving out the right encoder and using the pins as an interface for extended UI - the pins would work as 2 serial inputs and one output.

eh2k commented 2 years ago

Hallo all,

there is a new RC firmware version 0.0j available (2022-04-24-firmware_0.0j.zip).

Besides some bugfixes, you can now configure a quantaizer for each cv-input. (https://github.com/eh2k/squares-and-circles#machine-io-config).

Thanks for your feedback.

oldmanfury commented 2 years ago

Can you point me at the location (in the many, many files) of the default calibration values? It would be nice if I could keep the calibration from update to update - takes a while, since it is so thorough!

eh2k commented 2 years ago

@oldmanfury, you don't need to re-calibrate after an update. If you press [left] on startup - you will enter the calibration-page - the old values are still there loaded. After finishing the setup procedure - the values are saved and an empty patch is loaded.

oldmanfury commented 2 years ago

Fantastic! Was afraid that doing that would trip up my previous cal.

oldmanfury commented 2 years ago

A feature request (is this the right place for that?) - being able to send the 4 engines to any of the 4 outputs would be really handy. There are times where I'd like all four on one channel, just so I don't have to use a dedicated mixer module prior to routing the audio elsewhere. Just a 'output' row where you select A,B,C,D would be great. Maybe that would make the reverb modules more versatile too - just route the signals you want reverbed to C or D (if the reverb is using those outputs).

djdoz commented 2 years ago

How do I add my own Spin fv-1 algorithms onto this?

Which dattorro reverb was implemented? Do you have the original spin fv-1 assembly language file so that I am able to maybe figure this out?

I assume this is implemented here, https://github.com/eh2k/squares-and-circles/blob/main/src/faust/rev_dattorro.hxx and https://github.com/eh2k/squares-and-circles/blob/main/src/faust/rev_dattorro.dsp

eh2k commented 2 years ago

@djdoz

fv-1 algorithms can't be added easily at the moment. I have used an experimental toolchain for this, which I currently do not make available as open source. I am currently pursuing an approach that will make this possible later on.

The "Rev-Dattorro" is from Faust - you have to install the faust compiler, that translates faust-code to c++ (the files you mentioned). The algorithm can be found in the reverbs.lib - https://github.com/grame-cncm/faustlibraries/blob/master/reverbs.lib#L494

eh2k commented 2 years ago

Hello all, I have created a separate issue regarding output routing/mixing. You are welcome to discuss or make suggestions.

By the way - since yesterday there is a new module on ModularGrid: https://www.modulargrid.net/e/modules/browser?SearchName=squares+and+circles&SearchShowothers=1&order=newest

eh2k commented 2 years ago

@MidiSlave - no problems with grids triggers (5V impulse, 1ms duration)

jrachedi commented 2 years ago

@eh2k Great work, thank you for this amazing contribution ! I don't know if I should post this here I'd like to create an engine with polyphonic midi control, is it possible for now ? I guess it should happen in the Process function, but there seem to be only one MidiNote object in the ControlFrame definition. Is there another variable I can reach from the process function which can give me the overall midi state ?

eh2k commented 2 years ago

Hello @jrachedi, thank you for the feedback. I have now reworked the API again in the "dev" branch (there are some midi optimizations included). I plan to transfer the "dev" branch to the "main" in the next few days/weeks. If you want to do something in advance just use the "dev" branch - I think this is what you are looking for: https://github.com/eh2k/squares-and-circles/wiki/Code-Snippeds#midiengine. If you notice anything that doesn't work as expected - just create a new issue.

MidiSlave commented 2 years ago

@oldmanfury how did you go with USB midi? @eh2k It would seem the trigger expander i'm using is only really capable of sending minimum 5ms triggers but only the extra OH trigger input doesn't like it.

oldmanfury commented 2 years ago

@oldmanfury how did you go with USB midi? Great! - latest development version USB midi seems to be working. Kind of amazing having 4 synth engines accessible via midi from my teletype / i2c2midi combo!

MidiSlave commented 2 years ago

@oldmanfury I bet it is. are you talking about RC 0.0j ? mine is not showing up as a device.