|
Post by feijai on Nov 15, 2023 10:44:40 GMT
Available in my repository. These have only been mildly debugged and no doubt still have bugs, perhaps significant ones. I'll get those fixed quickly I hope. I have one project not finished yet so it's not posted yet. - LATTICE. A Mutable Instruments Grids clone. Like a "TOPOGRAF Light".
- BEATS. A 4-track trigger sequencer with song mode and space for up to 800 patterns of up to 256 steps, plus swing, repeats, advancing, etc.
- GEIGER. A three-output random trigger generator and bernoulli gate.
- PULSES. A two- or three-output square-wave LFO generator with options for LFO mixtures and syncing.
- THEORY. One, Two, or Three digital outputs set up as mathematical functions of four, five, or six analog inputs. You specify the functions.
- MULTIPLE. A two-track clock multiplier with a variety of multiplication options.
- Edit: New ORATION. A significantly improved version of Talkie (SpellOrSpeak), with a very large vocabulary.
- Edit: New ORATION 2. A variant of ORATION which uses an earlier version of Talkie to provide features the new version cannot.
- Edit: New DIVVY. A clock divider.
- Edit: New ELEMENTS. A Euclidian sequencer.
- Edit: New PATTERN. A four-channel digital pattern generator.
- Edit: New BOOKER. A Hammond Organ simulator with a Leslie. Requires Mozzi.
- Edit: New EVOLUTION. An evolving 9-partial additive drone oscillator. Requires Mozzi.
- Edit: New CHORDAL. A chord oscillator which mixes between sine and saw, square, or triangle. Requires Mozzi.
- Edit: New SWITCHBLADE. A smoother, summing attenuator, and fuzzer. Requires Mozzi.
- Edit: New STOCHASTIC. A variety of random CV generation functions. Requires Mozzi.
More to come. Fun facts I learned along the way: - Digital Out can be used as a digital in!
- In3 and Audio In can be used as digital outs!
- Audio out works fine as a digital out.
- There is a bug in GRAINS which reduces the range of the pots when they are in IN1 or IN2 switch position. :-(
- There is a bug in Audio IN: its impedance is much too high, likely due to the low-pass filter. So if you did an analogRead() of some other pin, then did an analogRead(Audio In), you'll get the value of the *previous* read! You have to do a throwaway analogRead().
- You can't use In2 or In1 as digital outs, it'll reboot the GRAINS (and probably damage the pins, don't do that).
- Setting up tracking requires care, but it can be done.
|
|
|
Post by admin on Nov 15, 2023 11:37:41 GMT
Wow, all if these sound really cool! I'll be sure to try them out on the weekend!
|
|
|
Post by dizzeesatchel on Nov 15, 2023 11:53:40 GMT
Wow, super impressive! Now i see why easier access to the usb on AEpi would be so useful to you! ![:D](//storage.proboards.com/forum/images/smiley/grin.png) Definitely going to give these firmwares a whirl soon ![:)](//storage.proboards.com/forum/images/smiley/smiley.png)
|
|
|
Post by rockysmalls on Nov 15, 2023 15:39:31 GMT
Available in my repository. These have only been mildly debugged and no doubt still have bugs, perhaps significant ones. I'll get those fixed quickly I hope. I have one project not finished yet so it's not posted yet. - LATTICE. A Mutable Instruments Grids clone. Like a "TOPOGRAF Light".
- BEATS. A 4-track trigger sequencer with song mode and space for up to 800 patterns of up to 256 steps, plus swing, repeats, advancing, etc.
- GEIGER. A three-output random trigger generator and bernoulli gate.
- PULSES. A two- or three-output square-wave LFO generator with options for LFO mixtures and syncing.
- THEORY. One, Two, or Three digital outputs set up as mathematical functions of four, five, or six analog inputs. You specify the functions.
- MULTIPLE. (NOT YET FINISHED). A two-track clock multiplier with a variety of multiplication options.
More to come. Fun facts I learned along the way: - Digital Out can be used as a digital in!
- In3 and Audio In can be used as digital outs!
- Audio out works fine as a digital out.
- There is a bug in GRAINS which reduces the range of the pots when they are in IN1 or IN2 switch position. :-(
- There is a bug in Audio IN: its impedance is much too high, likely due to the low-pass filter. So if you did an analogRead() of some other pin, then did an analogRead(Audio In), you'll get the value of the *previous* read! You have to do a throwaway analogRead().
- You can't use In2 or In1 as digital outs, it'll reboot the GRAINS.
these don’t require the ‘mozzi’ switch do they? i have a number of older Grains might fancy a night out with at least 4 of those ![:)](//storage.proboards.com/forum/images/smiley/smiley.png)
|
|
|
Post by rockysmalls on Nov 15, 2023 15:47:51 GMT
ok, so all good in ‘old school’ grains ![:)](//storage.proboards.com/forum/images/smiley/smiley.png)
|
|
|
Post by feijai on Nov 15, 2023 16:07:24 GMT
MULTIPLE has now been posted as well, though it could stand some improvement.
|
|
|
Post by pt3r on Nov 16, 2023 6:13:48 GMT
May I suggest to randomize your random in the geiger script since every call to the random function will produce the same outcome unless you seed it first call a randomseed with the analog read value of a unconnected pin.
|
|
|
Post by feijai on Nov 16, 2023 8:09:39 GMT
Oops, duh of course, fixed.
Not sure if I need multiple analogReads to get a good number due to impedance...
|
|
|
Post by pt3r on Nov 16, 2023 8:28:42 GMT
I will need to invest some time this weekend in testing these scripts on my GRAINS. Really curious whether I can replicate the mentioned hardware bugs. admin can you move this thread to the Programming GRAINS section?
|
|
|
Post by feijai on Nov 16, 2023 8:59:56 GMT
Working on an improved Talkie script next.
|
|
|
Post by admin on Nov 16, 2023 11:03:56 GMT
admin can you move this thread to the Programming GRAINS section? Your wish is my command ![;)](//storage.proboards.com/forum/images/smiley/wink.png)
|
|
|
Post by pt3r on Nov 16, 2023 11:37:02 GMT
|
|
|
Post by duddex on Nov 16, 2023 19:07:37 GMT
[...] Fun facts I learned along the way: - [...]
- In3 and Audio In can be used as digital outs!
- [...]
- You can't use In2 or In1 as digital outs, it'll reboot the GRAINS.
Wow - this is great. Having additional outs is opening so many new opportunities I also tried using the INs as OUTs. And I thought, I bricked my GRAINS ( forum.aemodular.com/thread/1858/serialport-show-anymore-brick-grains) After that I was a bit more careful and didn't try again if INs can be used as OUTs. It's good to know that it works with In3
|
|
|
Post by feijai on Nov 16, 2023 20:18:30 GMT
Wow - this is great. Having additional outs is opening so many new opportunities I also tried using the INs as OUTs. And I thought, I bricked my GRAINS (https://forum.aemodular.com/thread/1858/serialport-show-anymore-brick-grains) After that I was a bit more careful and didn't try again if INs can be used as OUTs. It's good to know that it works with In3 I was more fortunate: my GRAINS just rebooted. But I didn't tempt fate. Anyway, that's how I have four digital outs for my trigger sequencer: Audio Out, Digital Out, Audio In, and In 3 all set to OUTPUT. So another trick I've employed several times in my projects: feeding CLOCK into IN1 while still using POT1 to provide analog data. To do this, set POT1 to "In1". Let's assume CLOCK is near 5V. So when the value is > N for some low value N, you assume a CLOCK is arriving. Wait several loop() iterations, maybe about 16 to 20, for the CLOCK to reach its maximum, then measure the maximum value. That's your POT1 value since it's attenuating the CLOCK. So each CLOCK you can both be notified of the clock *and* can get the POT1 value. Of course, this means that the POT1 can't go below the "low" clock value or it just turns the clock off. And there's a GRAINS bug/misfeature: when in "In1" mode, POT1 (and POT2) rises to maximum way too early, reaching 1023 at about 2 o'clock.
In theory you could feed CLOCK and CV into IN1 too: you'd run CLOCK into a VCA set to DC, with the CV as the VCA CV, thus multiplying the two. The output is then fed into IN1. Put POT1 to maximum and there you go.
You could use this trick again in POT2 for, say, RESET but it's not so useful as it's too rare. But if RESET was when we went LOW, we could read POT2 until it got to a low value, and assumed that was a RESET or whatever. I also regularly use Audio In as an analog in or as a digital out. But as an analog in, its impedance is far too high (due to the filter?) so you have to have at least one throwaway analogRead(AudioIn) before you can analogRead(Audio In) and consistently get proper values.
|
|
|
Post by feijai on Nov 16, 2023 20:26:51 GMT
Wow - this is great. Having additional outs is opening so many new opportunities So what opportunities are you thinking?
|
|
|
Post by duddex on Nov 16, 2023 21:47:44 GMT
For example what you did in the Lattice module: having three drum triggers instead of just two.
The third trigger really makes the difference for me
|
|
|
Post by feijai on Nov 16, 2023 22:49:18 GMT
Here's what I don't know about GRAINS: what happens if you short an output pin to ground or to 5V. Particularly Audio In or In3, which are normally input. Can you damage them? Want to make double certain doing this is okay.
|
|
|
Post by pt3r on Nov 17, 2023 7:19:31 GMT
It feels like we're now reaching a level in GRAINS hacking where it would indeed be a good thing to collect more information, i.e. what software (+ patching) manipulations can brick/fry your GRAINS?
- Buffer overflows will very likely brick your GRAINS - Setting IN1 or IN2 to out will brick your GRAINS. - ...
|
|
|
Post by feijai on Nov 17, 2023 10:15:49 GMT
WARNING.
I don't want to damage people's GRAINS. But many of my projects use IN3 and AudioIn as OUTPUTS. So I have made them non-compilable with a big warning, because I do not yet know from TangibleWaves whether IN3 and AudioIN safely have inline resistors (typically 150 mohm) so they can be used safely as OUTPUTS even if they are shorted to ground, to +5V, or to another output. Or if every possible output socket has a 150 ohm resistor inline, including ground/+5V on the MASTER I/O and on the Braedboard, and +5V on the 4ATT-MIX, so there's nothing to short to.
Some projects also use DigitalOut as an INPUT, but I think that should be fine?
Please grab the new version of the code. And Robert, can you tell us if IN3 and AudioIn can be used safely as outputs? ;-(
|
|
|
Post by feijai on Nov 17, 2023 21:32:13 GMT
So it appears that In3 and AudioIn have 4.7Kohm resistors in series (and I'm measuring 4.4-4.6kohms). That's plenty to prevent damage to them as outputs. So I hope we're okay?
|
|
|
Post by feijai on Nov 21, 2023 0:46:46 GMT
I have officially "unlocked" all the GRAINS projects (deleted the temporary little item I added to the code causing them to not compile). This is because Robert has verified that In3 and AudioIn both have protective resistors and can be safely used as outputs. So we're good!
Also posted some more projects, and have a big one coming up but it may take a while because I don't have the hardware to test it yet.
|
|