Search:

Type: Posts; User: electrolove

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. Replies
    4
    Views
    1,599

    Re: Sorting strings like humans do?

    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....
  2. Replies
    4
    Views
    1,599

    Sorting strings like humans do?

    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
  3. Replies
    3
    Views
    21,977

    Hold your horses, I think I got it now :-)

    Hold your horses, I think I got it now :-)
  4. Replies
    3
    Views
    21,977

    I will tell you what I am trying to do. I have...

    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...
  5. Replies
    3
    Views
    21,977

    Static but never defined?

    When building I get a warning like this:

    `MyReadProc' declared `static' but never defined

    Can someone please help me with this?
  6. Replies
    1
    Views
    1,004

    Simple Cocoa/Objective-C question

    I just wonder how I make a function (Method) (without parameters) and call it in Objective-C? Any examples? :o
  7. Replies
    10
    Views
    2,238

    I have tested the code now and it does exactly...

    I have tested the code now and it does exactly the thing I want (as far as I know)

    Thanks Magos :D
  8. Replies
    10
    Views
    2,238

    Yea, I realize now that my example of a gap of 16...

    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...
  9. Replies
    10
    Views
    2,238

    This code seems nice for gaps of 16. Can I...

    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
  10. Replies
    10
    Views
    2,238

    No, I don't need random numbers, thanks anyway :-)

    No, I don't need random numbers, thanks anyway :-)
  11. Replies
    10
    Views
    2,238

    Calculate nearest number?

    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...
  12. Replies
    6
    Views
    1,164

    Thanks :o

    Thanks :o
  13. Replies
    6
    Views
    1,164

    Can someone explain this for me? Returns 0:...

    Can someone explain this for me?

    Returns 0:
    currentbpm / requestedbpm * currenttimestamp

    Returns the right value;
    currenttimestamp * currentbpm / requestedbpm
  14. Replies
    6
    Views
    1,164

    Why does it return 0? currenttimestamp =...

    Why does it return 0?

    currenttimestamp = 1000000000;
    currentbpm = 120;
    requestedbpm = 240;

    This prints the right value: 1000000000
    printf(("currenttimestamp %016llX\n"), currenttimestamp);...
  15. Replies
    6
    Views
    1,164

    Yea, you are absolutely right, I am blind, no no...

    Yea, you are absolutely right, I am blind, no no nooooooooooooooooo :p
  16. Replies
    6
    Views
    1,164

    Function problem!

    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...
  17. I'm not sure I follow you here. Please explain...

    I'm not sure I follow you here. Please explain with a good example :rolleyes:
  18. Ok, I see, seems to be a easy way of doing it....

    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...
  19. Can you please give me an example what you mean?...

    Can you please give me an example what you mean? :o
  20. How do I implement a Tempo function in my sequencer?

    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...
  21. Replies
    21
    Views
    3,508

    Maybe it's a better idea to have 2 separate...

    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...
  22. Replies
    21
    Views
    3,508

    Well, I can't comment the first thing you wrote...

    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...
  23. Replies
    21
    Views
    3,508

    It's defined as char because 99% of the things I...

    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...
  24. Replies
    21
    Views
    3,508

    The only code that is working properly is: ...

    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...
  25. Replies
    21
    Views
    3,508

    testing testing, hold on...

    testing testing, hold on...
Results 1 to 25 of 63
Page 1 of 3 1 2 3