Automation adjustments for Tools->Structure operations
Moderators: MattKingUSA, khz, spamatica
-
- Established Member
- Posts: 580
- Joined: Mon Feb 08, 2010 10:38 am
- Has thanked: 86 times
- Been thanked: 100 times
Automation adjustments for Tools->Structure operations
The structure operations (Functions->Structure) are very useful but have for a very long time had various stability issues. Tim fixed that up for 3.1 I think.
Now one more improvement makes them even more useful as they should adjust automation correctly when cutting and inserting. Available in git master.
Now one more improvement makes them even more useful as they should adjust automation correctly when cutting and inserting. Available in git master.
MusE DAW
- oscillator
- Established Member
- Posts: 1127
- Joined: Sat Jan 17, 2015 6:07 pm
- Location: SWEDEN
- Has thanked: 725 times
- Been thanked: 298 times
- Contact:
Re: Automation adjustments for Tools->Structure operations
Wow, either I have been ignorant, or a lot of things have happened here!
I haven't even seen the Midi Transform! And the Structure tools will be very useful, especially the Global Split!
A month ago I looked at the Piano Roll > Plugins, as they are easily editable Python scripts. I wanted to change the tempo of selected notes. But they operate on the midi "file" data, which is confusing.
Is there an API for scripting MusE? I would love to be able to change the speed of selected midi data. This could be an interesting starting point to contributing to code for me (I have a background as a programmer).
Thank you for all these tools, will have to check them out in depth!
I haven't even seen the Midi Transform! And the Structure tools will be very useful, especially the Global Split!
A month ago I looked at the Piano Roll > Plugins, as they are easily editable Python scripts. I wanted to change the tempo of selected notes. But they operate on the midi "file" data, which is confusing.
Is there an API for scripting MusE? I would love to be able to change the speed of selected midi data. This could be an interesting starting point to contributing to code for me (I have a background as a programmer).
Thank you for all these tools, will have to check them out in depth!
MusE DAW running on Debian 11 Testing/XFCE4.
https://oscillator.se/musik
-
- Established Member
- Posts: 669
- Joined: Sat Sep 15, 2012 12:36 am
- Has thanked: 40 times
- Been thanked: 110 times
Re: Automation adjustments for Tools->Structure operations
See README.python about remote python scripting:
https://github.com/muse-sequencer/muse/ ... DME.python
Also in the main README there is some installation info that differentiates between the
simple 'function' scripts and the full remote scripting discussed in README.python. (They are different in nature.)
https://github.com/muse-sequencer/muse/ ... DME.python
Also in the main README there is some installation info that differentiates between the
simple 'function' scripts and the full remote scripting discussed in README.python. (They are different in nature.)
- oscillator
- Established Member
- Posts: 1127
- Joined: Sat Jan 17, 2015 6:07 pm
- Location: SWEDEN
- Has thanked: 725 times
- Been thanked: 298 times
- Contact:
Re: Automation adjustments for Tools->Structure operations
The remote scripting looks very cool and powerful, thanks!Tim E. Real wrote: ↑Mon May 25, 2020 8:12 am See README.python about remote python scripting:
https://github.com/muse-sequencer/muse/ ... DME.python
Also in the main README there is some installation info that differentiates between the
simple 'function' scripts and the full remote scripting discussed in README.python. (They are different in nature.)
I have been looking at the scripts here: muse/muse3/share/scripts/
and they operate on the "midi file" (.med content), right?
I was more thinking of an API to edit the midi data directly without affecting what is saved.
MusE DAW running on Debian 11 Testing/XFCE4.
https://oscillator.se/musik
-
- Established Member
- Posts: 580
- Joined: Mon Feb 08, 2010 10:38 am
- Has thanked: 86 times
- Been thanked: 100 times
Re: Automation adjustments for Tools->Structure operations
Oh, I almost forgot about the python interface. It's better documented than I remember.oscillator wrote: ↑Mon May 25, 2020 8:36 amThe remote scripting looks very cool and powerful, thanks!Tim E. Real wrote: ↑Mon May 25, 2020 8:12 am See README.python about remote python scripting:
https://github.com/muse-sequencer/muse/ ... DME.python
Also in the main README there is some installation info that differentiates between the
simple 'function' scripts and the full remote scripting discussed in README.python. (They are different in nature.)
I have been looking at the scripts here: muse/muse3/share/scripts/
and they operate on the "midi file" (.med content), right?
I was more thinking of an API to edit the midi data directly without affecting what is saved.
Apart from the README, I guess we should start referring to the wiki instead
https://github.com/muse-sequencer/muse/ ... te-control
--
I see you found the scripts folder, there is a README.txt file there (which I now included - and updated a bit - in the wiki too https://github.com/muse-sequencer/muse/ ... ile-format)
Not sure what you mean by "file" data in this case, these scripts are not for manipulating .med files
The protocol for manipulating midi data is sent to the plugin via a file but that is just a convenience, the format of the data should be pretty straightforward.
Here is an example of the dataformat:
TIMESIG 4 4
PART 6144 6144
BEATLEN 384
QUANTLEN 96
NOTE 1536 65 96 70
NOTE 2400 69 96 70
As for the parameters in NOTE I think they are
NOTE <position in the part (in ticks)> <pitch> <length (in ticks)> <velocity>
Not 100% sure what you mean by changing tempo of selected notes but there is the existing script DoubleSpeed that maybe can be used as a starting point.
MusE DAW
- oscillator
- Established Member
- Posts: 1127
- Joined: Sat Jan 17, 2015 6:07 pm
- Location: SWEDEN
- Has thanked: 725 times
- Been thanked: 298 times
- Contact:
Re: Automation adjustments for Tools->Structure operations
I didn't know what I was talking about!
But now I now. Thanks for updating the wiki!
This is exactly what I was looking for. I did a HalfSpeed script some months ago, but lost it, so I will recreate it.
The wiki is looking better and better all the time! Good work!
MusE DAW running on Debian 11 Testing/XFCE4.
https://oscillator.se/musik
- oscillator
- Established Member
- Posts: 1127
- Joined: Sat Jan 17, 2015 6:07 pm
- Location: SWEDEN
- Has thanked: 725 times
- Been thanked: 298 times
- Contact:
Re: Automation adjustments for Tools->Structure operations
The menu for "/muse3/share/scripts/" seems to be built compile time.
But I created a local folder at $HOME/.config/MusE/MusE/scripts
and this one is read when MusE is run.
For HalfSpeed I just took DoubleSpeed and changed the line
to
or, even better, change the length too:
In DoubleSpeed the line should read:
Could this be my first code contribution to MusE?
But I created a local folder at $HOME/.config/MusE/MusE/scripts
and this one is read when MusE is run.
For HalfSpeed I just took DoubleSpeed and changed the line
Code: Select all
newline = tag + " " + str(int(int(tick)/2)) + " " + pitch + " " + length + " " + velocity
Code: Select all
newline = tag + " " + str(int(int(tick)*2)) + " " + pitch + " " + length + " " + velocity
Code: Select all
newline = tag + " " + str(int(int(tick)*2)) + " " + pitch + " " + str(int(length)*2) + " " + velocity
Code: Select all
newline = tag + " " + str(int(int(tick)/2)) + " " + pitch + " " + str(int(length)/2) + " " + velocity
Could this be my first code contribution to MusE?
MusE DAW running on Debian 11 Testing/XFCE4.
https://oscillator.se/musik
-
- Established Member
- Posts: 580
- Joined: Mon Feb 08, 2010 10:38 am
- Has thanked: 86 times
- Been thanked: 100 times
Re: Automation adjustments for Tools->Structure operations
Indeed it could
If you want to go the extra km (then you are all set for coming contributions), you could read up on creating a pull-request for your changes on github.
There are some hoops to jump through but it can be a good learning experience.
MusE DAW
- oscillator
- Established Member
- Posts: 1127
- Joined: Sat Jan 17, 2015 6:07 pm
- Location: SWEDEN
- Has thanked: 725 times
- Been thanked: 298 times
- Contact:
Re: Automation adjustments for Tools->Structure operations
That's a great idea! Give me a few days to read up on it! Do I need any special permissions to do so?
MusE DAW running on Debian 11 Testing/XFCE4.
https://oscillator.se/musik
- oscillator
- Established Member
- Posts: 1127
- Joined: Sat Jan 17, 2015 6:07 pm
- Location: SWEDEN
- Has thanked: 725 times
- Been thanked: 298 times
- Contact:
Re: Automation adjustments for Tools->Structure operations
Following this guide: https://medium.com/javascript-in-plain- ... f777623f18
I have done steps 1-6. Forked the repos, created a branch named muse-1-python.
Then I made the following changes:
modified: muse3/share/scripts/CMakeLists.txt
deleted: muse3/share/scripts/DoubleSpeed
changed/added:
muse3/share/scripts/SpeedDouble
muse3/share/scripts/SpeedHalf
Step 7-8? Where is this file. And how do I commit the changes?
I get the messages:
EDIT: Made the changes via the webb-interface for GitHub and did a pull request. First time for me, so please bear with me for making any errors.
I have done steps 1-6. Forked the repos, created a branch named muse-1-python.
Then I made the following changes:
modified: muse3/share/scripts/CMakeLists.txt
deleted: muse3/share/scripts/DoubleSpeed
changed/added:
muse3/share/scripts/SpeedDouble
muse3/share/scripts/SpeedHalf
Step 7-8? Where is this file. And how do I commit the changes?
I get the messages:
So step 9 (push) doesn't really do anything, which means I can't do a pull request.On branch muse-1-python
Changes not staged for commit:
modified: muse3/share/scripts/CMakeLists.txt
deleted: muse3/share/scripts/DoubleSpeed
Untracked files:
muse3/share/scripts/SpeedDouble
muse3/share/scripts/SpeedHalf
no changes added to commit
EDIT: Made the changes via the webb-interface for GitHub and did a pull request. First time for me, so please bear with me for making any errors.
MusE DAW running on Debian 11 Testing/XFCE4.
https://oscillator.se/musik
-
- Established Member
- Posts: 580
- Joined: Mon Feb 08, 2010 10:38 am
- Has thanked: 86 times
- Been thanked: 100 times
Re: Automation adjustments for Tools->Structure operations
Oh, I wasn't even aware you could do it completely through the web. The actual pull request I usually do through the web interface though.oscillator wrote: ↑Tue May 26, 2020 11:48 pm Following this guide: https://medium.com/javascript-in-plain- ... f777623f18
I have done steps 1-6. Forked the repos, created a branch named muse-1-python.
Then I made the following changes:
modified: muse3/share/scripts/CMakeLists.txt
deleted: muse3/share/scripts/DoubleSpeed
changed/added:
muse3/share/scripts/SpeedDouble
muse3/share/scripts/SpeedHalf
Step 7-8? Where is this file. And how do I commit the changes?
I get the messages:
So step 9 (push) doesn't really do anything, which means I can't do a pull request.On branch muse-1-python
Changes not staged for commit:
modified: muse3/share/scripts/CMakeLists.txt
deleted: muse3/share/scripts/DoubleSpeed
Untracked files:
muse3/share/scripts/SpeedDouble
muse3/share/scripts/SpeedHalf
no changes added to commit
EDIT: Made the changes via the webb-interface for GitHub and did a pull request. First time for me, so please bear with me for making any errors.
Regarding the guide you were following it looks like one step was left out.
After editing the files you need to 'add' all files you want to belong to the commit.
E.g.
git add muse3/share/scripts/CMakeLists.txt
...
and then
git commit
git push
<and then the method for doing the pull request>
...
Checking what you changed can be done with:
git status (which will show all files that have changes, and all files that are untracked (new files))
git diff <filename> (to see what your changes were)
git is a pretty complex system and it is possible to get completely lost but you can get very far with 'add,diff,status,commit,push,pull' commands.
https://xkcd.com/1597/
MusE DAW
- oscillator
- Established Member
- Posts: 1127
- Joined: Sat Jan 17, 2015 6:07 pm
- Location: SWEDEN
- Has thanked: 725 times
- Been thanked: 298 times
- Contact:
Re: Automation adjustments for Tools->Structure operations
Thanks a bunch, will use the CLI next time!
MusE DAW running on Debian 11 Testing/XFCE4.
https://oscillator.se/musik