terminal tedium (raspberry zero, pi2, pi3 codec / pd thing)

From circuitbending to homebrew stompboxes & synths, keep the DIY spirit alive!

Moderators: Kent, luketeaford, Joe.

Post Reply
jmsiener
Learning to Wiggle
Posts: 38
Joined: Tue May 24, 2016 2:00 pm
Location: Kentucky

Re: terminal tedium (raspberry zero, pi2, pi3 codec / pd thing)

Post by jmsiener » Fri Aug 28, 2020 10:47 am

Man, I'm no expert by any means but I've always had problems going from one SD card to another once the distro was set up. I've had no problems going from Pi3 to Pi3+ SD cards but going from Pi3 to Pi4 and vice verse has always been buggy or just not booting in my experience. I'd imagine using the zero would mean going back in time a few generations of pi with the lack multiple cores.

Good luck with this, looks great. Super dig your work - keep it up.

thetechnobear
Wiggling with Experience
Posts: 419
Joined: Wed Feb 11, 2015 8:17 am
Contact:

Re: terminal tedium (raspberry zero, pi2, pi3 codec / pd thing)

Post by thetechnobear » Sat Aug 29, 2020 5:32 am

you do not need to be in the script directory, just run it (create_pi.sh) from the root of the repo.
e.g ./script/create_pi.sh

(btw: you should be using the TT form of it)

the orac repo contains all binaries need to build the 'orac image' which I distribute.

BUT beware that Orac really is only the pure data side of what you see, it is built upon a number of binaries... the main one is my Kontrol software, which is part of my MEC project (and so MEC) repo.
MEC is also 'platform' agnostic, so for some platforms it brings in other projects of mine - in this case TTUI, which is the C++ api I created for terminal tedium, and also contains sidekick.

however, as mentioned above, if you just need the binaries, then the orac binary already creates this.

thetechnobear
Wiggling with Experience
Posts: 419
Joined: Wed Feb 11, 2015 8:17 am
Contact:

Re: terminal tedium (raspberry zero, pi2, pi3 codec / pd thing)

Post by thetechnobear » Sat Aug 29, 2020 8:18 am

Sidekick service for norns ?

Is this just a typo in my service file? Is it definitely using the ttui version?


I’d need to see the log file for failing service which you can get via journalctl

Bare in mind GPIO pins and i2c addresses are ‘hardcoded’

thetechnobear
Wiggling with Experience
Posts: 419
Joined: Wed Feb 11, 2015 8:17 am
Contact:

Re: terminal tedium (raspberry zero, pi2, pi3 codec / pd thing)

Post by thetechnobear » Sat Aug 29, 2020 10:55 am

unless your into linux dev, id not start compiling, thats a whole rabbit whole of fun
(e.g. the above Id guess is an incorrect version of gcc for some reason)


as for the log, I need the log for the sidekick service, you should be able to get **just** this with

journalctl -u sidekick

(this is in the readme on github for orac)

btw: yeah just checked the 'norns' reference is just a cut n paste error

btw2: if your using the orac repo, by looking at checkins id say you'd want the dev ( not master, or tt)

User avatar
gbiz
Super Deluxe Wiggler
Posts: 1080
Joined: Tue May 07, 2013 11:20 am
Location: Sussex, UK

Re: terminal tedium (raspberry zero, pi2, pi3 codec / pd thing)

Post by gbiz » Sat Aug 29, 2020 11:34 am

As nobody else has mentioned it, a general observation on this from a linux/unix perspective ...

Whatever it is you are running there is being killed due to an illegal instruction (SIGILL, signal 4). pd was reporting the same thing in the logs on the previous page. As it's the only issue you're getting it's likely down to the binary itself being compiled for the wrong architecture, or one or more of the shared libraries it's linked against being for the wrong arch. (If you were experiencing other issues away from this then i'd suggest it could be faulty memory/disk etc, but it doesn't look like you are).

You can use "file" to show what architecture a binary is compiled for. Use "ldd" to show the shared libraries the binary is linked against. If you suspect any of those, use "file" to show what those were compiled for.

SIGILL will dump a core file, unless core dumps are disabled. If you have the core file you can use gdb to determine what's the issue is. ("man 5 core" will details how you find where systemd is storing the corefile).

User avatar
gbiz
Super Deluxe Wiggler
Posts: 1080
Joined: Tue May 07, 2013 11:20 am
Location: Sussex, UK

Re: terminal tedium (raspberry zero, pi2, pi3 codec / pd thing)

Post by gbiz » Sat Aug 29, 2020 1:11 pm

Yes that could be it.
I had a quick look into what could cause SIGILL on the Pi. Binaries built for ARMv7 or 8 would do this on an an ARMv6.
File doesn't show the architecture the binary is built for, which is why they possibly all look the same, but "readelf -A " shows the cpu arch the binary was built for. Try it against a few of the binaries above, including /usr/bin/yes as a reference.

(disclaimer ... I don't have much experience with the Pi)

thetechnobear
Wiggling with Experience
Posts: 419
Joined: Wed Feb 11, 2015 8:17 am
Contact:

Re: terminal tedium (raspberry zero, pi2, pi3 codec / pd thing)

Post by thetechnobear » Sat Aug 29, 2020 2:21 pm

I think MEC and sidekick are compiled with '-march=armv7-a -mfpu=neon -mfloat-abi=hard' , so compiler will optimise (so use instructions) for this architecture. (sorry, not used pi zero, so dont know what its using)

`is there a flag i can use to disable compilation of the SPLITE stuff? i t`
if you look in the CMake file you'll find it , along with other things you can disable....

saying that, you're better to start with compiling ttuilite, and see if you can get sidekick to run,
thats where the hardware interaction is done.

btw: you dont need to get MEC running on TT, you only actually need the KontrolRack/KontrolModule Pd externals


also if the compile options are wrong, then Id expect the mutable instrument externals (of mine) will also need recompiling (Mi4Pd)

thetechnobear
Wiggling with Experience
Posts: 419
Joined: Wed Feb 11, 2015 8:17 am
Contact:

Re: terminal tedium (raspberry zero, pi2, pi3 codec / pd thing)

Post by thetechnobear » Sun Aug 30, 2020 7:36 am

You can set DISABLE_SOUNDPLANELITE from command line when invoking cmake, no need to edit cmake files.

I’m not sure why it’s not working for you, since cmake looks to be using this in mec-api ( I checked dev branch)

thetechnobear
Wiggling with Experience
Posts: 419
Joined: Wed Feb 11, 2015 8:17 am
Contact:

Re: terminal tedium (raspberry zero, pi2, pi3 codec / pd thing)

Post by thetechnobear » Sun Aug 30, 2020 11:55 am

cool..
so if you have already compiled and copied KontrolRack and KontrolModule (part of mec) ,
then i suspect its the MI modules, as i think i use those in the 'demo patch' that is loaded at startup.

the other thing is... there are a whole bunch of PD externals that are from other sources (ie not mine) , these are used by various 'factory' modules.
... i guess you should be able to find these on decken?

thetechnobear
Wiggling with Experience
Posts: 419
Joined: Wed Feb 11, 2015 8:17 am
Contact:

Re: terminal tedium (raspberry zero, pi2, pi3 codec / pd thing)

Post by thetechnobear » Mon Aug 31, 2020 5:55 am

:( unfortunately the others i dont have the source for, nor compiled...

if they are not on deken ,
they are probably in pd-extended which you can find the source for.
hopefully should not be to hard to build from the source.

thetechnobear
Wiggling with Experience
Posts: 419
Joined: Wed Feb 11, 2015 8:17 am
Contact:

Re: terminal tedium (raspberry zero, pi2, pi3 codec / pd thing)

Post by thetechnobear » Mon Sep 07, 2020 5:16 am

screen - my guess would be i2c address, that requires a code change.
(if its not that then Id need to debug it)

btw: in ttuilite repo there is a test program iirc

service file lock ups... thats probably just linux constantly restarting services that are failed.
if they were working, they would require very little cpu

audio glitches, could be the above... or you have not got the rPI into performance mode.


- mec should not be needed to RUN (but the TT external is part of it for building purposes)
- sidekick is 'optional' - you can run orac directly , sidekick just allows you to switch between other 'applications'

so for testing you can simply run PD as per orac.service
Note: it **MUST** be run as root, since access to gpio/oled requires root permissions.

thetechnobear
Wiggling with Experience
Posts: 419
Joined: Wed Feb 11, 2015 8:17 am
Contact:

Re: terminal tedium (raspberry zero, pi2, pi3 codec / pd thing)

Post by thetechnobear » Mon Sep 07, 2020 9:58 am

ttuitest i think requires the orac image (orac.pbm) to be in the current directory.

thetechnobear
Wiggling with Experience
Posts: 419
Joined: Wed Feb 11, 2015 8:17 am
Contact:

Re: terminal tedium (raspberry zero, pi2, pi3 codec / pd thing)

Post by thetechnobear » Tue Sep 08, 2020 6:12 am

hmm... well better than nothing .. and explains why Orac is running but your getting blank displays!

are you using SH1106 ? if you were using something different then its possible/likely only some (simple) functions would work, but many others would not - code changes are needed to switch model, and also need to check if the functions used by orac are supported on a different model.

however, Im a bit surprised, you didn't get output on both screen, since its the same code...
and Id assume the I2C address is correct, otherwise the ttuitest app would complain it cannot open the 2nd display.

note: be aware, Im half remember making some code changes to ArduiPi_OLED... I think this was to make it work for dual displays (*)
Id have to go back to see what these were, and if it'd need further changes for other oled models.

(*) these are obviously in the ttui version you built from.

thetechnobear
Wiggling with Experience
Posts: 419
Joined: Wed Feb 11, 2015 8:17 am
Contact:

Re: terminal tedium (raspberry zero, pi2, pi3 codec / pd thing)

Post by thetechnobear » Tue Sep 08, 2020 6:37 am

seismic wrote:
Mon Sep 07, 2020 1:13 pm

also things are upside down, because i had no space to install the display the other way around... i tried to change the rotation setting in the Adafruit_GFX.cpp file. but orientation stayed the same..
just checked.... there is no support for display rotation in ArduiPi_OLED lib
the code that is there is commented out, and looks incomplete to me (that uses rotation var)
(just to be clear invert, is used for changing black to white etc)

its looks like the SSH1306 hardware supports this so should not be that difficult... or it could likely be done in the GFX lib quite easily.
but that would all need testing.

one its works, then ttuilite could then be extended to support this.

ps.
Ive been reluctant to make ttuilite configurable, since its a library... so should be an api change, so that then implies that other code changes are required further up the code stack to read this configuration from somewhere (most likely a file) - so thats was all a bit of a pain, for something that was unlikely to be used ;)

User avatar
pld
Super Deluxe Wiggler
Posts: 1064
Joined: Thu Mar 05, 2015 5:15 am
Location: Germany
Contact:

Re: terminal tedium (raspberry zero, pi2, pi3 codec / pd thing)

Post by pld » Tue Sep 08, 2020 8:48 am

seismic wrote:
Tue Sep 08, 2020 8:10 am
rotation is a feature that usually gets implemented with a swith in the "drawpixel" function. (or doesn't, depends on where the library comes from..)
There's also some bytes in the controller init sequence that determine the RAM to screen mapping. One changes the scan direction, the other the mapping so you can flip the screen without changing the drawing code. Similarly you can bake in the 2px offset.

thetechnobear
Wiggling with Experience
Posts: 419
Joined: Wed Feb 11, 2015 8:17 am
Contact:

Re: terminal tedium (raspberry zero, pi2, pi3 codec / pd thing)

Post by thetechnobear » Tue Sep 08, 2020 2:03 pm

ttuitest already writes to both displays.

( I double checked it was working on my tt befoe posting)

User avatar
gbiz
Super Deluxe Wiggler
Posts: 1080
Joined: Tue May 07, 2013 11:20 am
Location: Sussex, UK

Re: terminal tedium (raspberry zero, pi2, pi3 codec / pd thing)

Post by gbiz » Wed Sep 09, 2020 4:43 am

seismic wrote:
Tue Sep 08, 2020 9:37 am
pld wrote:
Tue Sep 08, 2020 8:48 am
There's also some bytes in the controller init sequence that determine the RAM to screen mapping. One changes the scan direction, the other the mapping so you can flip the screen without changing the drawing code. Similarly you can bake in the 2px offset.
a cool - that would be one(or two) more byte in the init sequence and then problem solved. thx pld
If you've not found it yet, bit 0 of the the segment remap parameter (0xA0) can be used to vertically flip the screen on the ssd1306. 0xA0 maps segment 0 to column 0, 0xA1 maps column 127 to segment 0. I think you currently have the latter configured.

jmsiener
Learning to Wiggle
Posts: 38
Joined: Tue May 24, 2016 2:00 pm
Location: Kentucky

Re: terminal tedium (raspberry zero, pi2, pi3 codec / pd thing)

Post by jmsiener » Sun Sep 13, 2020 11:43 am

Did you build it from the fates image? Is this still on your zero based board? I feel like ORAC has to be installed on a modified Norns image to get all the stuff preconfigured so ORAC can run on top.

Meanwhile I got my TT plus OLEDs working with ORAC but when I powered in the other day I got no response... more to debug.

thetechnobear
Wiggling with Experience
Posts: 419
Joined: Wed Feb 11, 2015 8:17 am
Contact:

Re: terminal tedium (raspberry zero, pi2, pi3 codec / pd thing)

Post by thetechnobear » Sun Sep 13, 2020 12:11 pm

jmsiener wrote:
Sun Sep 13, 2020 11:43 am
I feel like ORAC has to be installed on a modified Norns image to get all the stuff preconfigured so ORAC can run on top.
thats not true :)

Orac/Mec etc, have zero connection to Norns... and run perfectly happily on rPI/Organelle etc that are usually based on Raspbian.

of course, whatever distro is being used, you'll have to configure for the soundcard, and might have to configure other things related to permissioning etc.

User avatar
fragletrollet
Veteran Wiggler
Posts: 510
Joined: Wed Dec 21, 2011 5:55 am
Location: Norge
Contact:

Re: terminal tedium (raspberry zero, pi2, pi3 codec / pd thing)

Post by fragletrollet » Fri Sep 18, 2020 3:52 am

...and here I just peeked inside to see if there was something I could use my Asus TinkerBoard for that can help my modular in a any way, and here I am 37 pages later, still pretty confused as to the final goal of the project in terms of functionality.

From a standpoint of a novice when it comes to programming and using microcontrollers (or single-board computers like the rPi/tinkerboard), I wonder if the challenge of building something involving alot of stuff I've never done before is reason enough to embark on this mission (altough it's no bad reason to try!), especially when it's still a little unclair what algorithms I will be able to use.

My "programming" experience is basically down to having flashed/compiled code onto a bunch of modules using teensys, and making a rotary encoder with an Arduino R3 and some neopixels... I haven't even tried out the Linux version for the TinkerBoard, as I installed the Android OS straight away in attempts of making some sort of media-server/music library thing, but that's not really working out as it feels impractical and just another step added to what my computer does. I do however have some good friends who are very experienced with Linux and can probably guide me through these aspects I'm unexperienced with regarding the digital side of the setup process.

I'm briefly known with Orac; a friend has an Organelle M that I've installed Orac onto, but haven't been able to delve into as I was too busy having fun with all the (really good) patches available. Are the different "patches" on the Organelle made with PD, and thus will work on the Terminal Tedium? There are some great algorithms in the Organelle, and I'd love to try to make an Eurorack module that can use some of those. It's also the question of the specific patch/algorithm being suited to the I/O of the TT.


...TLDR: what "patches", programs or algorithms or whatever they'd be called can be used with the Terminal Tedium?

Oh, and can I use my TinkerBoard with the TinkerOS Debian with the TT?

Following the progress with interest...

:party:

haK
Learning to Wiggle
Posts: 2
Joined: Tue Sep 15, 2020 2:24 pm

Re: terminal tedium (raspberry zero, pi2, pi3 codec / pd thing)

Post by haK » Sat Sep 19, 2020 12:49 pm

Hi Everybody!! Its my first post YEAH!!

I am a happy TT (including the little traverse bay) owner and recently installed the amazing ORAC.

Thank you very much for sharing this with the community technobear!

I have one question though: Is it possible to use the cv inputs 3 and 6 and somehow pipe them straight into a patch?

I have successfully converted some of my patches into ORAC modules however pretty much all of my patches use the 6 cv inputs/knobs and it would be great to have them all at once available/cv-able without having to change pages.

I tried to incorporate the terminal_tedium_adc external into a patch but that didn't work.

I am aware that some of the ORAC routing and oled display wouldn't work as it should anymore, nevertheless I could take advantage of the filesystem and load my old patches without having to reboot and changing SDs.

cheers

thetechnobear
Wiggling with Experience
Posts: 419
Joined: Wed Feb 11, 2015 8:17 am
Contact:

Re: terminal tedium (raspberry zero, pi2, pi3 codec / pd thing)

Post by thetechnobear » Mon Sep 21, 2020 2:21 pm

haK wrote:
Sat Sep 19, 2020 12:49 pm

I have one question though: Is it possible to use the cv inputs 3 and 6 and somehow pipe them straight into a patch?

I have successfully converted some of my patches into ORAC modules however pretty much all of my patches use the 6 cv inputs/knobs and it would be great to have them all at once available/cv-able without having to change pages.

I tried to incorporate the terminal_tedium_adc external into a patch but that didn't work.

I am aware that some of the ORAC routing and oled display wouldn't work as it should anymore, nevertheless I could take advantage of the filesystem and load my old patches without having to reboot and changing SDs.

cheers
as you say, there is not really a way to do this within orac since there basically the UI doesn't have space to show 6 parameters.

but if you have pd patches that work standalone .. then you could just use sidekick to launch these.

also sidekick supports and OSC interface, so you can interface with it directly, to talk to the displays and cv etc.
you can find info on this in my TTuiLite repo

https://github.com/TheTechnobear/TTuiLite

you can see my supercollider demos for details of the osc messages that are sent/received by ttui

generally that are the same as norns, except they use 'ttui' as a prefix, rather than 'nui'
https://github.com/TheTechnobear/NuiLit ... C-Messages

haK
Learning to Wiggle
Posts: 2
Joined: Tue Sep 15, 2020 2:24 pm

Re: terminal tedium (raspberry zero, pi2, pi3 codec / pd thing)

Post by haK » Tue Sep 22, 2020 8:56 am

Thanks Technobear for your reply.

I guess I am going to use sidekick to launch my standalone patches and switch back and forth between them and orac.

Its mainly the CV inputs I am after in order to have TT as much integrated in my Eurorack system as possible.
TTuiLite looks interesting.

Incidentaly. The ORAC CV tools module "cvin mod" isn't that supposed to take any of the audio and CV inputs as a mudulation source?
I can only get the audio-inputs to work. When I choose any of the other inputs I don't get signal. Is this normal behaviour, bug or am I missing something?

I am also gonna checkout your OSC interface. This might actually be very interesting for my bela pepper given the lack of a display.
Thanks for the links and thanks for your great work.

thetechnobear
Wiggling with Experience
Posts: 419
Joined: Wed Feb 11, 2015 8:17 am
Contact:

Re: terminal tedium (raspberry zero, pi2, pi3 codec / pd thing)

Post by thetechnobear » Tue Sep 22, 2020 12:41 pm

iirc
the pots & cv are connected in hardware on the TT (like bela pepper)
the four pots/cv are therefore used to control the parameters.
(as controlling parameter and menu with just the single encoder would have been 'more than tedious' ;) )

this leaves two pots/cv plus digital inputs...

now here Id need to go check... I though, Id assigned one of these to gate/pitch... but I might have left them free,
since as you say there are a couple of CV module,
one of which can be used to create note/gate from cv/digital inputs, the other as you say is for cv modulation.

however, I half remember someone say they had an issue with the cv/gate, but can't remember what it was...
Im pretty sure I tested this, but perhaps I need to got test it again. ( * )

note: people generally have a bit of difficulty getting their head around the modulation system ( ** ) , it works but can be a bit confusing.
the thing to note is cv mod works kind of the same way as midi learn.
so you need to add the module, make sure its pointing to the right cv input, then you need to use mod learn to assign it to something.
again Im pretty sure I had this working fine... but Id need to double check this ( *)


----------------

( * ) obviously I test all features before I release anything, but its always possible that when I do an update... I overlook that a change might have some unintended impact...
in this case, im wondering the last update i did with sidekick, might not have been reflected in the cv modules... but it was a while ago, so Id have to check.



( ** ) generally for Orac, Ive got 'plans' to re-write/replace the current modulation system with a mod-matrix that is easier to understand/use and also more feature rich, but its a pretty big undertaking, so Ive not got around to starting . Whilst this is not specific to TT, I do think for Orac in modular environments (like TT) this would have significant benefits.

thetechnobear
Wiggling with Experience
Posts: 419
Joined: Wed Feb 11, 2015 8:17 am
Contact:

Re: terminal tedium (raspberry zero, pi2, pi3 codec / pd thing)

Post by thetechnobear » Sat Sep 26, 2020 6:10 am

interesting... I guess if we compare whats in your 'simple' little program to the code in ttuitest we can see what the difference is.
as you say, must be some initialisation thats expected...but not occurring... interesting that the issue is only on second display thought !?

something to do with I2C initialisation? (given ttui is just using as 2 separate i2c addresses, and sending exactly the same to both displays)

Post Reply

Return to “Music Tech DIY”