Command line (Midi) sequencer?

Support & discussion regarding DAWs and MIDI sequencers.

Moderators: MattKingUSA, khz

User avatar
Linuxmusician01
Established Member
Posts: 1632
Joined: Mon Feb 23, 2015 2:38 pm
Location: Holland (Europe)
Has thanked: 853 times
Been thanked: 161 times

Re: Command line (Midi) sequencer?

Post by Linuxmusician01 »

jeanette_c wrote: Sun Sep 10, 2023 11:01 am

Hi @Linuxmusician01 , I don't know of much in the way of tutorials. If you are interested, you migith be interested in my extra commands:
http://juliencoder.de/test/sound/jbs_mi ... .8.tar.bz2
At the end of your ~/.midishrc add:
exec "/path/to/your/user_dir/.midish_extra";
At the top of that file you need to make your device setup, which is outlined in the manual. My setup has lines like these, using ALSA sequencer:
dnew 0 "20:0" rw # use sequencer port 20:0 in read/write or i/o mode
dnew 1 "Prophet 12 Keyboard" rw # use the ALSA sequencer port of that name for read/write input/output
To add more USB MIDI gear that you sometimes want and sometimes not, you could have a procedure like that in your .midishrc:
proc add_burte {
dnew 4 "Arturia MiniBrute 2S" rw;
inew brute {4 0}; # named input channel
onew brute {4 0}; # named output channel
dclktx [dlist]; # make sure clock is sent to all devices
}
These inew and onew commands are good ones to put in your .midishrc, so you can create named channels. That way you can address your synths' MIDI channels by name and not by numbers like {4 0} or {0 12}. Much more usable.
If you have further questions, please feel free to ask, either right here or via PM.
Best wishes, Jeanette

Thank you for the info and the tips. I'm gonna have to try and find me some time to read the manual.

Curious to see if quickly creating a Midi file for synth or drumcomputer is doable. And curious to see if Midish is usable for looping. The current solutions I have for this via the command line and they pause for a short time after playing, which timing-wise is a deal breaker for drum computer sequences of course.

jeanette_c
Established Member
Posts: 733
Joined: Tue May 12, 2020 5:53 pm
Has thanked: 350 times
Been thanked: 273 times

Re: Command line (Midi) sequencer?

Post by jeanette_c »

Midish is not good for pattern based stuff. You can loop a recorded section and it will loop perfectly. If you need sequencing and quantising of notes, then Midish might be the tool for it.
If you feel more performance oriented and rather rely on your playing skills, there is sooperlooper, which can run on the console. It may need some setting up, but it can be keyboard and MIDI controlled.
Best wishes, Jeanette

--
distro: ArchLinux, DAW: Nama, MIDI sequencer: Midish
All my latest music on https://www.youtube.com/channel/UCMS4rf ... 7jhC1Jnv7g
Albums, patches and Csound on http://juliencoder.de
ahlstromcj
Established Member
Posts: 9
Joined: Wed Jun 01, 2022 2:11 pm
Been thanked: 4 times

Re: Command line (Midi) sequencer?

Post by ahlstromcj »

Seq66 (an advanced derivative of Seq24) can run headless (or in the console). One can set up a MIDI controller/display device (e.g. LaunchPad) using the GUI, then run the setup from the CLI or as a daemon. The user manual is extensive.

https://github.com/ahlstromcj/seq66

jeanette_c
Established Member
Posts: 733
Joined: Tue May 12, 2020 5:53 pm
Has thanked: 350 times
Been thanked: 273 times

Re: Command line (Midi) sequencer?

Post by jeanette_c »

Hi @ahlstromcj , seq66 has been mentioned before in this thread. But it appears that even a GUI setup is not feasible. It still seems an interesting program.

--
distro: ArchLinux, DAW: Nama, MIDI sequencer: Midish
All my latest music on https://www.youtube.com/channel/UCMS4rf ... 7jhC1Jnv7g
Albums, patches and Csound on http://juliencoder.de
ahlstromcj
Established Member
Posts: 9
Joined: Wed Jun 01, 2022 2:11 pm
Been thanked: 4 times

Re: Command line (Midi) sequencer?

Post by ahlstromcj »

A GUI setup is not feasible? Are you starting from source code (i.e. git clone)? Or getting it from a distro or AUR? I haven't looked at the CLI build in a couple of weeks, but I edit, build, and run Seq66 daily. Can you let me know your process and where it does not work? Thanks! -- Chris

jeanette_c
Established Member
Posts: 733
Joined: Tue May 12, 2020 5:53 pm
Has thanked: 350 times
Been thanked: 273 times

Re: Command line (Midi) sequencer?

Post by jeanette_c »

Hi @ahlstromcj , when I said a GUI setup is not feasible, I did not mean that your software is faulty, but simply that I personally can't and don't use a GUI. CAN'T, not won't or don't want to.
I have just tried to clone seq66 from github and compile it, but even with the configure flag
--diisable-qt
ends up trying to include a QT header file (QBrush).
This is no slide against seq66, it just means that it will, currently, not be a choice for me. Thanks for your help and your persistence.
Best wishes, Jeanette

--
distro: ArchLinux, DAW: Nama, MIDI sequencer: Midish
All my latest music on https://www.youtube.com/channel/UCMS4rf ... 7jhC1Jnv7g
Albums, patches and Csound on http://juliencoder.de
User avatar
Linuxmusician01
Established Member
Posts: 1632
Joined: Mon Feb 23, 2015 2:38 pm
Location: Holland (Europe)
Has thanked: 853 times
Been thanked: 161 times

Re: Command line (Midi) sequencer?

Post by Linuxmusician01 »

ahlstromcj wrote: Fri Sep 29, 2023 4:38 pm

A GUI setup is not feasible? Are you starting from source code (i.e. git clone)? Or getting it from a distro or AUR? I haven't looked at the CLI build in a couple of weeks, but I edit, build, and run Seq66 daily. Can you let me know your process and where it does not work? Thanks! -- Chris

I love applications with a GUI. However, my Raspberry Pi is too old and thus too slow to run: a desktop environment/GUI and JackAudio and anything music/audio. And there are a lot of cheap systems on a chip nowadays (R. Pi Pico) that might be used in the future with command line progs. And some times a CLI prog w/ a script is easier to run than clicking w/ the mouse etc. The learning curve for Midish is just steep.

I'm currently reading/studying the MidiSh manual and busy with other hobbies so my progress is slow. Very slow. And midish ain't not for the faint of heart. But I think that w/ the right knowledge it must be possible to create and/or run a Midi file or midish script with quantisation.

ahlstromcj
Established Member
Posts: 9
Joined: Wed Jun 01, 2022 2:11 pm
Been thanked: 4 times

Re: Command line (Midi) sequencer?

Post by ahlstromcj »

@jeanettc I did find an error in the configure.ac file that did not disable the QT flags. In the meantime, I renamed the Qbrush header to "hide" it, then did a "./configure --enable-cli --disable-qt" and that seemed to do the trick. I'll fix the configure.ac error in 0.99.10 in a few days. Let me know if you try again and if it works or doesn't work. Thanks!!!

jeanette_c
Established Member
Posts: 733
Joined: Tue May 12, 2020 5:53 pm
Has thanked: 350 times
Been thanked: 273 times

Re: Command line (Midi) sequencer?

Post by jeanette_c »

Hi @ahlstromcj , I just pulled ffrom Github again and the software compiles. I started it, but didn't get far with it.
Standard I/O rerouted to /dev/null
I see that there are a few config files, which I suppose I must first hack manually. At least it compiles and starts. So two steps forewards. :)
Thanks for the quick fix!
Best wishes, Jeanette

--
distro: ArchLinux, DAW: Nama, MIDI sequencer: Midish
All my latest music on https://www.youtube.com/channel/UCMS4rf ... 7jhC1Jnv7g
Albums, patches and Csound on http://juliencoder.de
User avatar
tkna
Established Member
Posts: 13
Joined: Mon Oct 16, 2023 7:29 pm
Location: Tokyo
Has thanked: 6 times
Been thanked: 3 times

Re: Command line (Midi) sequencer?

Post by tkna »

I found this, but not sure if it works in recent environments.
https://pi4.informatik.uni-mannheim.de/ ... ex_en.html

jeanette_c
Established Member
Posts: 733
Joined: Tue May 12, 2020 5:53 pm
Has thanked: 350 times
Been thanked: 273 times

Re: Command line (Midi) sequencer?

Post by jeanette_c »

tkna wrote: Tue Apr 09, 2024 1:37 pm

I found this, but not sure if it works in recent environments.
https://pi4.informatik.uni-mannheim.de/ ... ex_en.html

It's still packaged with Archlinux, though no longer maintained. As such it will run. But if you need actual cursor positioning it's difficult. Also it appears to only support 16 channels of MIDI, no device management and it need a hardware evice file, which still exists with ALSA raw MIDI.

Best wishes,

Jeanette

--
distro: ArchLinux, DAW: Nama, MIDI sequencer: Midish
All my latest music on https://www.youtube.com/channel/UCMS4rf ... 7jhC1Jnv7g
Albums, patches and Csound on http://juliencoder.de
User avatar
Linuxmusician01
Established Member
Posts: 1632
Joined: Mon Feb 23, 2015 2:38 pm
Location: Holland (Europe)
Has thanked: 853 times
Been thanked: 161 times

Re: Command line (Midi) sequencer?

Post by Linuxmusician01 »

jeanette_c wrote: Tue Apr 09, 2024 2:36 pm
tkna wrote: Tue Apr 09, 2024 1:37 pm

I found this, but not sure if it works in recent environments.
https://pi4.informatik.uni-mannheim.de/ ... ex_en.html

It's still packaged with Archlinux, though no longer maintained. As such it will run. But if you need actual cursor positioning it's difficult. Also it appears to only support 16 channels of MIDI, no device management and it need a hardware evice file, which still exists with ALSA raw MIDI.

Best wishes,

Jeanette

Also @tkna. I vaguely remember trying it out once... Something with it being a bit fiddly w/ recognising my midi device... When I try to run it I get the error:

Code: Select all

Error opening terminal: xterm-256color.

When I try to run it in the application Xterm then I get the error:

Code: Select all

Error opening terminal: xterm.

I remember for a certain app (probably cuse) that I got rid of the eror. But for some reason I gave up on it...

Anyway, after I think a year or more, I slowly (very slowly!) but surely got enough knowledge about midish to start some work on a shell script to make 16 step sequences and, eventually, chain 'm into a song. Here's how the main menu looks (note: not all menu items work yet!):

Image

@jeanette_c: I'm using your Extra RC config file! I even wrote a little midish procedure to accept a sequence of 16 notes (it's in my ~/.midishrc file).

If I (ever) finish my shell script I might post it and some info in a separate topic. It's very nice to use my Raspberry Pi with a small €15 screen and a power-bank to sequence my synth because I'm free from a wall outlet that way.

Image

jeanette_c
Established Member
Posts: 733
Joined: Tue May 12, 2020 5:53 pm
Has thanked: 350 times
Been thanked: 273 times

Re: Command line (Midi) sequencer?

Post by jeanette_c »

Hi @Linuxmusician01 , it's gratifying to hear that the Midish stuff still finds takers. I'm looking forward to see your extensions!

--
distro: ArchLinux, DAW: Nama, MIDI sequencer: Midish
All my latest music on https://www.youtube.com/channel/UCMS4rf ... 7jhC1Jnv7g
Albums, patches and Csound on http://juliencoder.de
User avatar
Linuxmusician01
Established Member
Posts: 1632
Joined: Mon Feb 23, 2015 2:38 pm
Location: Holland (Europe)
Has thanked: 853 times
Been thanked: 161 times

Re: Command line (Midi) sequencer?

Post by Linuxmusician01 »

(double post)

Last edited by Linuxmusician01 on Thu Sep 12, 2024 9:07 am, edited 1 time in total.
User avatar
Linuxmusician01
Established Member
Posts: 1632
Joined: Mon Feb 23, 2015 2:38 pm
Location: Holland (Europe)
Has thanked: 853 times
Been thanked: 161 times

Re: Command line (Midi) sequencer?

Post by Linuxmusician01 »

jeanette_c wrote: Wed Apr 10, 2024 11:53 am

Hi @Linuxmusician01 , it's gratifying to hear that the Midish stuff still finds takers. I'm looking forward to see your extensions!

@jeanette_c Still working on my "console step sequencer shell script" that I may or may not ever finish. ;) Can you explain why your commands/procedures rnew and pstep make midish echo these (error) messages?

Connect keyboard to synth:

Code: Select all

[0000:00]> rnew my_midi_keyboard my_synth
statelist_done: kat {5 0} 0 0: unterminated frame

Enter a step at bar 6, step 3 (of 0, 1, 2, 3), midi note 66 (= F#)

Code: Select all

[0000:00]> pstep 7 3 66
statelist_done: non {5 0} 42 7f: unterminated frame
statelist_done: kat {5 0} 0 0: unterminated frame
statelist_done: kat {5 0} 0 0: unterminated frame

I know what a frame is in midish (a midi event like a combination of midish device-number, Midi channel, Midi note-number and velocity). The "42 7f" meanns midi note number 42_hex = 66_dec = f# and velocity 7f_hex = 127_dec (= max). But what does "unterminated frame" mean?

Post Reply