Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Help with Supercollider for Music tech in University :)

Options
  • 13-10-2011 4:40pm
    #1
    Registered Users Posts: 63 ✭✭


    Have started supercollider and just not getting it....at all. If anyone can help would be very very greatfull. 1 assignment goes like this.....


    2a. Write a program that converts frequency in Hz to the nearest musical note name. First, convert the frequency to the nearest MIDI note. Then, using that MIDI note have your program determine the note name. Include sharps or flats when appropriate. You don't need to report the note's octave. (You will probably want to accomplish this by creating an array of note names (that includes sharps or flats), but do not create an array with 128 entries!) The final result of your program should post the frequency in Hz and the resulting musical note name.

    Test your program by using a random frequency generator such that each time you run the program, it picks a new frequency between 32 and 2000 Hz.

    2b. Starting with the eight notes of a C-major scale (C, D, E, F, G, A, B and C), randomly assign one of five rhythmic values (dotted-half, half, dotted-quarter, quarter or eighth) to each note in the scale. This note will always have this rhythmic value. Then, generate a melody of 16 randomly selected notes along with their matched rhythmic values. Create the melody such that G,B,D and F are two times as likely to occur as C,E or A. Post the resulting melody, with note names and associated rhythmic value.

    Each time your program runs, it should produce a different melody.




    Any help trying to understand this will be helpful


Comments

  • Registered Users Posts: 7,157 ✭✭✭srsly78


    Post up all your college notes first, then we will do your homework for you.


  • Registered Users Posts: 63 ✭✭Das89


    What?.....


  • Registered Users Posts: 7,157 ✭✭✭srsly78


    Well this is a very specific system. Gonna need notes to answer your question.

    Also, read this: http://www.boards.ie/vbulletin/showthread.php?t=2055050400


  • Registered Users Posts: 63 ✭✭Das89


    Well we have just started and only got few notes on the basics of SC. Im just finding it hard to get a grip with the basics.


  • Registered Users Posts: 428 ✭✭Joneser


    It depends a lot on what programming language you are using. Are you using Matlab or Java by any chance? My 4th yr project involved what you are trying to do.

    EDIT: If you provide some sample of what you have done so far, people (including me) will be more willing to help.


  • Advertisement
  • Registered Users Posts: 63 ✭✭Das89


    Sorry my bad. I will post what have done so far............



    Introduction

    SuperCollider is a text editor, programming language, compiler and digital synthesizer all in one. Please take a look at the Wikipedia entry, http://en.wikipedia.org/wiki/SuperCollider/.

    Starting Up SC

    Navigate to the folder in which SuperCollider resides and double-click on it. A window with text such as

    init_OSC
    compiling class library..
    NumPrimitives = 669
    compiling dir: '/Applications/SuperCollider/SCClassLibrary'
    compiling dir: '/Users/gary/Library/Application Support/SuperCollider/Extensions'
    pass 1 done
    Extension overwriting SimpleNumber:asTimeString
    in file '/Users/gary/Library/Application Support/SuperCollider/Extensions/sc3-plugins/ljpclasses/classes/LJP Classes/Extensions/SimpleNumber-asTimeString.sc'.
    Original method in file '/Common/Math/SimpleNumber.sc'.
    numentries = 981601 / 13459356 = 0.073
    Method Table Size 7385900 bytes
    Number of Method Selectors 4866
    Number of Classes 2766
    big table size 53837424
    Number of Symbols 11858
    Byte Code Size 360121
    compiled 439 files in 0.86 seconds
    compile done
    // History.logFolder: /Users/gary/Library/Application Support/SuperCollider/HistoryLogs
    Class tree inited in 0.03 seconds
    RESULT = 0
    StartUp done.
    Welcome to SuperCollider, type cmd-d for help

    appears in the top left of the screen. The window functions as the "post" window. This is where SuperCollider 'posts' all messages.

    Two more windows

    On the bottom of the screen are two more windows. One is called "localhost server" and the other is "internal server." Click on the "boot" button on the localhost server. The word "Boot" on the button changes to "Quit." More text, such as

    booting 57110
    Using vector unit: no
    Number of Devices: 3
    0 : "Built-in Microphone"
    1 : "Built-in Input"
    2 : "Built-in Output"

    "Built-in Microphone" Input Device
    Streams: 1
    0 channels 2

    "Built-in Output" Output Device
    Streams: 1
    0 channels 2

    mSafetyOffset 280
    mNumberBuffers 1
    mDataByteSize 0 4096
    <-SC_CoreAudioDriver::Setup world 0041CF90
    SC_AudioDriver: numSamples=512, sampleRate=44100.000000
    ->SC_CoreAudioDriver::DriverStart
    start UseSeparateIO?: 1
    <-SC_CoreAudioDriver::DriverStart
    SuperCollider 3 server ready..
    PublishPortToRendezvous 0 5855
    notification is on

    will print to the post window. The localhost server is now ready to be used. Activate the internal server, if you wish, in the same way.

    Workspace windows

    Open existing SC documents with File->Open... or cmd-o. Use File->New or cmd-n to create new documents.

    SuperCollider documents generally have .sc appended to their file names; however, SuperCollider can read and write documents in Rich Text Format (.rtf) and several other formats, as well.


    Important Commands

    Available as Menu-commands as well as command-key sequences:

    enter evaluate (and run) selected code / Ctrl-C
    cmd-. Stop all playback

    cmd-N new window
    cmd-O open file

    "Hello World".speak;

    In order to play audio, you have to first boot servers and then:

    {SinOsc.ar(LFNoise0.ar([10, 15], 400, 800), 0, 0.3)}.play;
    // Place the cursor anywhere on the line and then type 'enter'

    {
    RLPF.ar(
    LFSaw.ar([8, 12], 0, 0.2),
    LFNoise1.ar([2, 3].choose, 1500, 1600),
    0.05, mul: 0.4
    )
    }.play;
    // Use cursor to select all of these lines and then type 'enter'

    More Editing Commands:

    cmd-D Open help file for selected item
    cmd-z Undo Typing
    cmd-, Go to line number
    cmd-/ Make selected lines a comment
    Opt-cmd-/ Remove comment marks on selected lines
    cmd-] Shift code right
    cmd-[ Shift code left
    cmd-' Syntax colorize=
    double click enclosure Balance enclosures


  • Registered Users Posts: 63 ✭✭Das89


    Sorry couldnt attach kept failing.


Advertisement