Transpose Notes
-
- Newbie
- Posts: 7
- Joined: 21 Mar 2015 06:00
Transpose Notes
Hello, I'm making a note input device inspired by Ableton Push & would like to know how to add a transpose button to shift my pads up & down in increments of one step & one octave. I really cannot find the info on how to do that.
-
- Newbie
- Posts: 7
- Joined: 21 Mar 2015 06:00
Re: Transpose Notes
I guess this is the wrong place to ask basic questions for people that don't have a background in programming. Is snobbery around here a common thing?
Re: Transpose Notes
hmm I haven't noticed really any snobbery so far,sometimes people are just busy or don't know, but I have to say that your second comment does not invite a helpful response..
But I'll try to help:
I've never done what you are doing, but if you do it through scripting you would use the noteout(), arguments are: target,note,velocity,channel
So you would make a script, then execute it on expression x (if you are using pads or something like that I assume)
then in the script you would type:
noteout(your MIDI target, pitch, velocity (0 is off), MIDI channel);
so for the pitch argument you would calculate based on the index of your x value and the current octave/transposition (controlled by another variable through a pad/switch/fader/whatever you want)
you'll want to declare (create) an internal variable that knows what index you are on (using firstof()) so you could do: decl index = firstof(x);
so lets say the first pad you want as pitch 60 (middle C) it would be: index+60;
but then you'd want to add another variable based on the octave/pitch you are changing (i don't know exactly what you want to do)
let's say you change by octaves (12 pitches). Let's say that the variable that determines that is called O, let's say that you set up O so that in the middle it is zero and it increases and decreases by 12.
so your pitch would now be: index+60+O;
then you might make it cleaner and just declare a variable as P and make a velocity variable (which could be controlled by a fader or something) but let's just say the velocity will just be 0 or 127. so...
decl P = index+60+O;
decl V =x[index]*127;
noteout(MIDI target, P, V, MIDI channel);
making sense? So you could set this up in many different ways, using a for loop would be good. This is how you could do it through scripting, maybe there is a simpler way??? (maybe someone will post)
ALL of this stuff is in the user guide available on the liine site. No one has a problem answering simple questions, but just be patient, and if you don't want to wait search around or I highly recommend reading the guide so you can figure these basic things out.
That being said I have no problem helping so if you are confused or have a question feel free to ask. Also you can post what you are doing and I or someone else can help you with it (upload attachment-> add the file)
I'll try and post an example if I have time tonight.
But I'll try to help:
I've never done what you are doing, but if you do it through scripting you would use the noteout(), arguments are: target,note,velocity,channel
So you would make a script, then execute it on expression x (if you are using pads or something like that I assume)
then in the script you would type:
noteout(your MIDI target, pitch, velocity (0 is off), MIDI channel);
so for the pitch argument you would calculate based on the index of your x value and the current octave/transposition (controlled by another variable through a pad/switch/fader/whatever you want)
you'll want to declare (create) an internal variable that knows what index you are on (using firstof()) so you could do: decl index = firstof(x);
so lets say the first pad you want as pitch 60 (middle C) it would be: index+60;
but then you'd want to add another variable based on the octave/pitch you are changing (i don't know exactly what you want to do)
let's say you change by octaves (12 pitches). Let's say that the variable that determines that is called O, let's say that you set up O so that in the middle it is zero and it increases and decreases by 12.
so your pitch would now be: index+60+O;
then you might make it cleaner and just declare a variable as P and make a velocity variable (which could be controlled by a fader or something) but let's just say the velocity will just be 0 or 127. so...
decl P = index+60+O;
decl V =x[index]*127;
noteout(MIDI target, P, V, MIDI channel);
making sense? So you could set this up in many different ways, using a for loop would be good. This is how you could do it through scripting, maybe there is a simpler way??? (maybe someone will post)
ALL of this stuff is in the user guide available on the liine site. No one has a problem answering simple questions, but just be patient, and if you don't want to wait search around or I highly recommend reading the guide so you can figure these basic things out.
That being said I have no problem helping so if you are confused or have a question feel free to ask. Also you can post what you are doing and I or someone else can help you with it (upload attachment-> add the file)
I'll try and post an example if I have time tonight.
Last edited by ndivuyo on 24 Mar 2015 16:56, edited 6 times in total.
-
- Newbie
- Posts: 7
- Joined: 21 Mar 2015 06:00
Re: Transpose Notes
Thank you, I really appreciate that... I didn't mean to be incendiary, I've just encountered a sense of snobbery in general from different places especially when it comes to programming stuff, which I am a total newbie & trying my best to understand... So I apologize... And thank you again, I will now try my best to wrap my head around what you said, this stuff is a total different language than anything I am used to.
Cheers
Cheers
Re: Transpose Notes
ah sorry, wasn't it the right mindset when I wrote that (still am not really). there are some flaws in what I wrote above! so, I'm gonna make an example now and hopefully it'll clear some of that up. And if someone has an easier way hopefully they'll share
-
- Newbie
- Posts: 7
- Joined: 21 Mar 2015 06:00
Re: Transpose Notes
Cool, because I'm lost here reading the manual. It's a well written manual in how it explains what some of the things are, but I wish they would write it with examples of how everything is used in a musical context. And I've been searching for walk-thru projects to try to learn but cannot find what I'm looking for. I don't even know where to start, because I'm unclear as to what object I would even write a script in & how to connect it. Basically, all I have are pads & each one set to send out a particular midi note. I really think the makers of this should do more to have their manual explain things to musicians & not only programmers. I mean really, what does "getparent(object)", and the like supposed to mean for anyone that is not a programmer? And this IS a program targeting musicians & producers, people that are used to Minor scales, Augmented chords, envelope decays & spending hours on finger dexterity... I don't mean to rant, I just am frustrated here & feel let down by the makers of this program with seemingly great potential, but lacking the care to have show any practical knowledge to those that would like to learn it but come from musical backgrounds & the support I got from Liine was a sugar-coated RTFM, which I never take kindly to... So that is where I am with it, completely lost.
-
- Regular
- Posts: 315
- Joined: 02 Nov 2013 11:19
Re: Transpose Notes
divisionmonarchy wrote:I guess this is the wrong place to ask basic questions for people that don't have a background in programming. Is snobbery around here a common thing?
the other thing to keep in mind is that people are not always on-line 24/7 ready to jump in with a response. Giving people 12 hours to respond to your particular question and then getting impatient with no answer is probably just going to lead to your frustration.
Typical ways to get the best help around here -- attach a copy of what you have written so far. Describe (as you did) what you really want it to do. While you are waiting, take a look at all the templates already uploaded by users as well as all the helpful modules posted in the forums and on some user's sig lines. Often there is something already out there close to what you want to do. Transposition is a common need and many people have implemented it.
Unfortunately, writing non-trivial things in Lemur is hard work and takes time and research. Even for seasoned programmers, you end up spending 2x or 3x your initial estimate to get a script to do exactly what you want. The quickest path to your answer is not to post a question and wait for a response. It is digging through everything that has been done, downloading it, trying it out, then looking at the source to see how someone else implemented it. Scroll through all the topics and see how many have 0 responses. Also look at the time between the initial post and any subsequent responses. You're probably going to get to your goal faster and learn it better by digging around on your own.
-
- Newbie
- Posts: 7
- Joined: 21 Mar 2015 06:00
Re: Transpose Notes
Fair enough, I was projecting a my frustration from a less than helpful reply from Liine & I took it out here. I accept responsibility for that.
I guess I feel a little bit better knowing that even experienced programmers have difficulty with finding the right script.
And to be honest, I initially thought this would have been a simple task, I mean transposing is one of the most basic musical functions, so I assumed (I never learn not to it seems) that it would have been a basic thing. I realize it's a deep program, but at this point I have no idea how deep the wormhole goes.
And I am digging & watching any tutorial I can find, the difficulty in that for me is it's all in a language & process so foreign to me, I don't even know what I'm learning. And if the manual did explain this anywhere, it's not even in a format that I would recognize what it is saying... And I thought learning to play Flamenco guitar was a challenge
I'll keep trying, but I've been at this for a few days now & I might need to step back for a while because the frustration of the learning curve is overwhelming right now.
I guess one question I should ask is this: just starting from zero, what is the best way to learn & understand the scripting? I've learned things from Lynda.com with other programs in different categories, but they have nothing on this program & youtube videos I've seen show me how to get a monitor to show fader's value, but I can't see how I would apply that to anything I'm trying to do yet. The resources seem hidden. Is there a secret Lemur school or cult that I don't know about?
I guess I feel a little bit better knowing that even experienced programmers have difficulty with finding the right script.
And to be honest, I initially thought this would have been a simple task, I mean transposing is one of the most basic musical functions, so I assumed (I never learn not to it seems) that it would have been a basic thing. I realize it's a deep program, but at this point I have no idea how deep the wormhole goes.
And I am digging & watching any tutorial I can find, the difficulty in that for me is it's all in a language & process so foreign to me, I don't even know what I'm learning. And if the manual did explain this anywhere, it's not even in a format that I would recognize what it is saying... And I thought learning to play Flamenco guitar was a challenge
I'll keep trying, but I've been at this for a few days now & I might need to step back for a while because the frustration of the learning curve is overwhelming right now.
I guess one question I should ask is this: just starting from zero, what is the best way to learn & understand the scripting? I've learned things from Lynda.com with other programs in different categories, but they have nothing on this program & youtube videos I've seen show me how to get a monitor to show fader's value, but I can't see how I would apply that to anything I'm trying to do yet. The resources seem hidden. Is there a secret Lemur school or cult that I don't know about?
-
- Regular
- Posts: 315
- Joined: 02 Nov 2013 11:19
Re: Transpose Notes
Coming from a C programming background made dealing with the scripts easier for me.
The whole object thing and how Lemur works and what it's doing when it executes these things was harder to grasp.
Having a Monitor object show you the value of something is a huge deal because it will be a good way to debug your scripts and also to see what's going on as you try things out.
Attached is a very simple script. The note button sets a variable to the MIDI value for middle C. The Transpose button adds 12 to it. There's a fader for note velocity and a reset button to clear it all.
Play around with both the properties and behavior of the buttons, look at the scripts and see how they are executing and play around with different ways of manipulating the global variable. Note what happens in the Reset button script = by setting the NoteButton x variable to 1 it automatically trigger that button's script too run.
If I was going to actually transmit the note value, I'd uncomment the line at the bottom of the note script or use something like that.
Once you start to understand how scripts are executed and the ways you can reference variables inside any object, other scripts will become clearer. The manual is good for describing what each object can do and what parts are addressable. Manual + scripts + playing around eventually = knowledge.
The whole object thing and how Lemur works and what it's doing when it executes these things was harder to grasp.
Having a Monitor object show you the value of something is a huge deal because it will be a good way to debug your scripts and also to see what's going on as you try things out.
Attached is a very simple script. The note button sets a variable to the MIDI value for middle C. The Transpose button adds 12 to it. There's a fader for note velocity and a reset button to clear it all.
Play around with both the properties and behavior of the buttons, look at the scripts and see how they are executing and play around with different ways of manipulating the global variable. Note what happens in the Reset button script = by setting the NoteButton x variable to 1 it automatically trigger that button's script too run.
If I was going to actually transmit the note value, I'd uncomment the line at the bottom of the note script or use something like that.
Once you start to understand how scripts are executed and the ways you can reference variables inside any object, other scripts will become clearer. The manual is good for describing what each object can do and what parts are addressable. Manual + scripts + playing around eventually = knowledge.
- Attachments
-
- note.jzml
- basic note thingie
- (7.7 KiB) Downloaded 70 times
Re: Transpose Notes
hi divisionmonarchy,
In 2012 when I started with Lemur I was in a similar situation. No programming background, new to the iPad platform (I bought an iPad because of Lemur), and also new to wireless networks. The learning curve was indeed steep. With the help of the nice people here in the forum and with downloading about a hundred examples from the library and elsewhere I got to a point where I can do quite much now, write my own scripts, etc.
Two things help: 1. patience. It simply takes some time until you learn how Lemur works, until you learn the language. 2. keep emotions out of the way. Emotions never help with these kind of tasks, program code is pure math and as cold as ice. So should be the programmer, cold, humourless, concentrated. If something doesn't work, one has to go back to an example that works and study genuinely where the difference is. Eventually one finds the solution, alone or with the help of the forum. This is the moment where all this effort finally pays off, and emotions like joy, pride, etc. have their place again.
Regarding snobbery, forum members are not obliged to respond to questions. From an educational point of view it doesn't always make sense to present the solution on the silver plate. Letting the pupil learn by him/herself is the most efficient way of teaching. When one has mastered one aspect of Lemur by oneself one will advance with much more verve. Of course it's very kind if there is a helpful soul who walks you through a problem or posts a template, but generally it is so that the more you know yourself, the better the help you get. Lemur experts are only human, if a question is too simple and the answer can easily be found in the manual, they quickly lose interest. That's understandable.
Spending many hours just analysing existing templates really pays off. After some time you won't need this anymore, except for new ideas and concepts. Lemur will (or may) become a very reliable companion. By the way, Lemur is so powerful and affordable today, we really are in heaven.
In 2012 when I started with Lemur I was in a similar situation. No programming background, new to the iPad platform (I bought an iPad because of Lemur), and also new to wireless networks. The learning curve was indeed steep. With the help of the nice people here in the forum and with downloading about a hundred examples from the library and elsewhere I got to a point where I can do quite much now, write my own scripts, etc.
Two things help: 1. patience. It simply takes some time until you learn how Lemur works, until you learn the language. 2. keep emotions out of the way. Emotions never help with these kind of tasks, program code is pure math and as cold as ice. So should be the programmer, cold, humourless, concentrated. If something doesn't work, one has to go back to an example that works and study genuinely where the difference is. Eventually one finds the solution, alone or with the help of the forum. This is the moment where all this effort finally pays off, and emotions like joy, pride, etc. have their place again.
Regarding snobbery, forum members are not obliged to respond to questions. From an educational point of view it doesn't always make sense to present the solution on the silver plate. Letting the pupil learn by him/herself is the most efficient way of teaching. When one has mastered one aspect of Lemur by oneself one will advance with much more verve. Of course it's very kind if there is a helpful soul who walks you through a problem or posts a template, but generally it is so that the more you know yourself, the better the help you get. Lemur experts are only human, if a question is too simple and the answer can easily be found in the manual, they quickly lose interest. That's understandable.
Spending many hours just analysing existing templates really pays off. After some time you won't need this anymore, except for new ideas and concepts. Lemur will (or may) become a very reliable companion. By the way, Lemur is so powerful and affordable today, we really are in heaven.
Formant+Eurorack, PPG wave 2.2, Korg MS-20, etc., EWI 4000s, QuNeo, etc., Mixbus32c, u-he, MadronaLabs, Samplemodeling, NI, etc., iPad2/4/Pro