The strings are not the same, it was just an example, in fact the strings are often made of only chars, not numbers but if there are numbers I want that string to be sorted in the right 'human' way....
Type: Posts; User: electrolove
The strings are not the same, it was just an example, in fact the strings are often made of only chars, not numbers but if there are numbers I want that string to be sorted in the right 'human' way....
Dear forum!
I wonder if there is some smart code that will sort strings in alfabetical order in a human way?
Example:
Human way...
name1
name10
Hold your horses, I think I got it now :-)
I will tell you what I am trying to do.
I have a file called midithruCategory.m where the static function is located like this:
static void MyReadProc(const MIDIPacketList *pktlist, void...
When building I get a warning like this:
`MyReadProc' declared `static' but never defined
Can someone please help me with this?
I just wonder how I make a function (Method) (without parameters) and call it in Objective-C? Any examples? :o
I have tested the code now and it does exactly the thing I want (as far as I know)
Thanks Magos :D
Yea, I realize now that my example of a gap of 16 was not good. The thing I need is a function that takes the gap as parameter 1 and the value to be calculated as parameter 2. In that way I can use...
This code seems nice for gaps of 16.
Can I use this code idea even if the gap between numbers is something else then 16? Example:
20, 40, 60, 80
or
3, 6, 9, 12
No, I don't need random numbers, thanks anyway :-)
How to do this?
Example: I have a couple of numbers: 16, 32, 48, 64, 80, 96 and so on, they increase by 16 each time.
How can I change a random number to the nearest of these numbers?
In...
Thanks :o
Can someone explain this for me?
Returns 0:
currentbpm / requestedbpm * currenttimestamp
Returns the right value;
currenttimestamp * currentbpm / requestedbpm
Why does it return 0?
currenttimestamp = 1000000000;
currentbpm = 120;
requestedbpm = 240;
This prints the right value: 1000000000
printf(("currenttimestamp %016llX\n"), currenttimestamp);...
Yea, you are absolutely right, I am blind, no no nooooooooooooooooo :p
Why can't I do this without errors? I get the following 2 errors:
argument `currenttimestamp' doesn't match prototype
prototype declaration
UInt64 converttimestamp(UInt64 currenttimestamp, int...
I'm not sure I follow you here. Please explain with a good example :rolleyes:
Ok, I see, seems to be a easy way of doing it. But what about changes in tempo at different locations in my song? Every timstamp is from the beginning of the song, not the time between events. So I...
Can you please give me an example what you mean? :o
I know that there are many talented programmers here and I really need help with a problem I have. This is the story:
I am programming a midi sequencer. It can record and play back the music I...
Maybe it's a better idea to have 2 separate pointer lists. First list for 1024 pointers to different memory areas where the part is recorded. And the second list for 1024 pointers that is the actual...
Well, I can't comment the first thing you wrote because I am new to C programming and don't understand at this moment what you mean.
But I can tell why I have a pointer that points to the first...
It's defined as char because 99% of the things I want to save (read MIDI events) is bytes.
Here is the memory area with the pointer to the part and another pointer that points to the first byte...
The only code that is working properly is:
unsigned char* thru_ptr;
* (int *) thru_ptr = (int)(map[PartIndex]+4 );
I am adding 4 because thru_ptr is defined as char, at least I think so and...
testing testing, hold on...