블로그 이미지
Leeway is... the freedom that someone has to take the action they want to or to change their plans.
maetel

Notice

Recent Post

Recent Comment

Recent Trackback

Archive

calendar

1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
  • total
  • today
  • yesterday

Category

2008. 7. 1. 20:16 Method/Sound
http://www.algomusic.com/maxscore/

MaxScore was programmed in Java Music Specification Language by Nick Didkovsky (but requires no Java programming to operate).

MaxScore
currently exports to MusicXML so you can load your scores into Finale and Sibelius. MaxScore also exports to the GNU LilyPond automated engraving system.

MaxScore is a Max object which accepts messages that can create a score, add notes to it, transform them, perform it, save and load the score, as well as export the score to popular formats for professional publishable results.

MaxScore can play back a score and drive your MSP patches through an instrument interface. Scores can be created and modified in real-time.


'Method > Sound' 카테고리의 다른 글

Miller Puckette [The Theory and Technique of Electronic Music]  (0) 2011.10.19
소리의 3요소  (0) 2008.05.28
3-D Sound for Virtual Reality and Multimedia  (0) 2008.05.27
4. Synthesis Fundamentals  (0) 2008.05.26
Understanding Basic Music Theory  (0) 2008.05.26
posted by maetel


strcmp
Compare two strings
Returns an integral value indicating the relationship between the strings:
A zero value indicates that both strings are equal.
A value greater than zero indicates that the first character that does not match has a greater value in str1 than in str2; And a value less than zero indicates the opposite.


printf format tags
%[flags][width][.precision][length]specifier



atoi
Convert string to integer
On success, the function returns the converted integral number as an int value.
If no valid conversion could be performed, a zero value is returned.
If the correct value is out of the range of representable values, INT_MAX or INT_MIN is returned.



StudentRecord record[NStudent];

StudentRecord *record;
StudentRecord *record_c;

record = new StudentRecord[NStudent];

// C++ version of allocating a memory block

record_c = (StudentRecord *) malloc (sizeof(StudentRecord)*NStudent);
// C version of allocating a memory block
// void * malloc ( size_t size );



malloc
Allocate memory block

ref.   Dynamic Memory Allocation: new and delete (C++)



"NUL indicates end-of-string." (교재 65쪽)


memcpy
서 교수님:
두 개의 struct type 데이터에 대해서, A = B;라고 하여 B를 A에 assign 하는 경우 대부분은 성립합니다. 그러나, struct 내부에서 배열을 가지고 있는 경우에는 그렇지 않습니다. 그래서 memcpy() 라는 함수를 사용하여 메모리를 블럭 단위로 카피하는 방법이 있습니다. 이는 음악 CD나 DVD 의 바이너리 카피를 만드는 것과 같은 이치입니다.




posted by maetel
Steve Oualline
Practical C Prgoramming
6. Decision and Control Statements


calculations, expressions, decision and control statements

control flow
linear programs
branching statements (cause one section of code to be executed or not executed, depending on a conditional clause)
looping statements (are used to repeat a section of code a number of times or until some condition occurs)


if Statement


if (condition)
    statement;

relational operator

"According to the C syntax rules, the else goes with the nearest if."


KISS principle (Keep It Simple, Stupid)
: We shoud write code as cleary and simply as possible.

"By adding an extra set of braces, we improve readability, understanding, and clarity."



strcmp
Compare two strings
: The function compare two strings, and then returns zero if they are equal or nonzero if they are different.
: This function starts comparing the first character of each string. If they are equal to each other, it continues with the following pairs until the characters differ or until a terminanting null-character is reached.
: Returns an integral value indicating the relationship between the strings: A zero value indicates that both strings are equal. A value greater than zero indicates that the first character that does not match has a greater value in str1 than in str2; And a value less than zero indicates the opposite.


Looping statements
while statement

while (condition)
    statement;

The program will repeatedly execute the statement inside the while until the condition becomes false (0).

the Fibonacci numbers    (피보나치 수, 한글 위키백과)


break statement
Loops can be exited at any point through the use of a break statement.


continue statement

"Programs should be clear and simple and should not hide anything."




'@GSMC > 서용덕: DMD Programming' 카테고리의 다른 글

[Steve Oualline] 7. Programming Process  (0) 2008.04.05
week 4 review  (0) 2008.03.27
week 3 review  (0) 2008.03.22
[Steve Oualline] 5. Arrays, Qualifiers, and Reading Numbers  (0) 2008.03.16
hw2  (0) 2008.03.15
posted by maetel
Practical C Programming
http://www.oreilly.com/catalog/pcp3/

Chapter 4. Basic Declarations and Expressions


Basic Program Structure


The basic elements of a program are the data declarations, functions, and comments.

main() 함수는 첫번째로 호출되는 함수이며, 이 main 함수가 다른 함수들을 직접 또는 간접으로 호출한다.

return(0);는 프로그램이 정상적으로 (Status=0) 존재했었음을 OS에게 보고하기 위해 쓰인다. : return value가 클수록 error가 심각하다는 뜻이다.



Variables
Each variable has a variable type.
A variable must be defined in a declaration statement just before the main() line at the top of a program.

http://en.wikipedia.org/wiki/Computer_numbering_formats

http://en.wikipedia.org/wiki/Signed_number_representations



Assignment statements
The general form of the assignment statement is:
variable = expression;
The = is used for assignment.



printf Function

printf

: a standard function to output our message
Print formatted data to stdout
Writes to the standard output (stdout) a sequence of data formatted as the format argument specifies. After the format parameter, the function expects at least as many additional arguments as specified in format.
The format tags follow this prototype:
%[flags][width][.precision][length]specifier

: 표준 입출력 함수- 표준 입출력 장치를 통해 데이터를 입력하거나 출력하는 기능을 갖고 있는 함수
- 표준 입출력 함수를 사용하려면 #include <stdio.h>를 기술해 줘야 한다.
[형식] printf(" 출력양식 ", 인수1,인수2...);
- 서식문자열에는 모든 문자를 사용할 수 있으며 변환문자와 제어문자를 제외하고는 화면에 그대로 출력
- 인수와 변환문자는 일대일 대응해야 하며 반드시 인수의 자료형과 문자의 자료형은 일치해야 한다.
ex) printf("%d + %d= %d\n",10,20,30);
출력결과 10+20=30


stdout
Standard output stream
: the default destination of regular output for applications. It is usually directed to the output device of the standard console (generally, the screen).

cf. library fuctions


%d
: integer conversion specification

parameter list

The general form of the printf statement is:
printf(format, expression-1, expression-2, ...);
where format is the string describing what to point.



Characters

escape character


'@GSMC > 서용덕: DMD Programming' 카테고리의 다른 글

hw2  (0) 2008.03.15
week 2 review  (0) 2008.03.15
hw1  (0) 2008.03.10
Key concepts in programming: statement & expression  (1) 2008.03.09
week 1 review - keywords & file I/O  (0) 2008.03.07
posted by maetel
2008. 2. 24. 01:40 Computation/Language
아니 뭐 이런 천사 같은 사람들이 이렇게 많아...

http://www.diveintopython.org/


1
How to Think Like a Computer Scientist
Learning with Python (2nd Edition)
by Jeffrey Elkner, Allen B. Downey and Chris Meyers
illustrated by Udit Bhatnager and Chris Schmeelk

-> 너무나 친절한 설명. 컴퓨터 프로그래밍 언어에 대한 개념을 처음 잡을 때 힘들게 정리했던 것들이 1장에 깔끔하게 요약되어 있고. @.@ 진도 진짜 천천히 나간다. 자연계라면 좀 지루할 정도. 손 놓고 있는 동안 다 잊어 버렸을까 걱정했는데 이거 한 번 보면 될 듯. 파이썬 아니, 코딩 처음 공부할 때 여기 알았으면 진짜 편했을텐데. ㅜㅜ

2
Python Tutorial
Guido van Rossum
Python Software Foundation

-> 지금 보면 좀 나으려나? 설명이 압축적이라 막상 코딩을 짤 때에는 의외로 큰 도움이 되지 못했었다. 코딩에 대한 것이 아니라 언어 자체에 대한 설명이기 때문이다. 나한텐 어렵다. 내겐 필요 없는 내용도 많다. 그래도 필독. 일종의 사전이라고 생각한다. (사전 본다고 글이 써지는 건 아니잖아? ^^;)

3
Penzilla.net's Python Tutorial


4
O'Reilly Python Center

-> 그래도 중급 이상 되기 전에는 안 사. ㅋ 오호. Jython이라...
Jython is an implementation of the Python programming language written in Java, allowing Python programs to integrate seamlessly with any Java code.



Python에서의 프로그래밍, Part 1



etc.

Text Processing in Python
by David Mertz -- published by Addison Wesley

-> 나중에 유용할 날이 있을 듯한 예감.


http://coreapython.hosting.paran.com/

'Computation > Language' 카테고리의 다른 글

16진수 10진수로 변환 strtol()  (0) 2008.08.12
numeric library  (0) 2008.03.18
Using Python for CGI programming  (0) 2007.07.11
classes in Python  (0) 2007.07.11
Python  (0) 2007.06.26
posted by maetel
2007. 2. 28. 01:15 Computation/Language

'Computation > Language' 카테고리의 다른 글

Java tutorials  (0) 2007.02.28
The Java™ Tutorials  (0) 2007.02.28
<HeadFirst Java>  (0) 2006.07.13
Java  (0) 2006.05.17
object-oriented programming  (0) 2006.05.01
posted by maetel
2006. 3. 31. 02:26 Computation/Language



'Computation > Language' 카테고리의 다른 글

The Java™ Tutorials  (0) 2007.02.28
The Java Technology  (0) 2007.02.28
<HeadFirst Java>  (0) 2006.07.13
Java  (0) 2006.05.17
object-oriented programming  (0) 2006.05.01
posted by maetel