示例#1
0
int main() {
	struct note *C=make_note(261);
	struct note *Cs=make_note(20);	
	struct note Notelist[2]={*C,*Cs};
	printf("%i\n", (&Notelist[1])->comp);
	printf("%lu\n",sizeof(struct note));


};
示例#2
0
void write_music(sp_data *sp, void *ud)
{
    udata *udp = ud;
    SPFLOAT out[8];
    SPFLOAT mix, verb, foo;
    for(int i = 0; i < 8; i++) {
        make_note(sp, udp->tenv[i], udp->posc[i], sp->pos, ((i * NOTEDUR) + NOTEDUR), &out[i]);
    }
    mix = (out[0] * 0.2) + (out[1] * 0.2) + (out[2] * 0.2) + (out[3] * 0.2) + (out[4] * 0.2) + (out[5] * 0.2) 
       + (out[6] * 0.2) +  (out[7] * 0.2);
    sp_revsc_compute(sp, udp->rev, &mix, &mix, &verb, &foo);
    sp->out[0] = mix + (verb * 0.2);
}
示例#3
0
文件: txt.c 项目: aahls/txt
void mode_add(int argc, char **argv, note_db_t *db, int importance){
    int i, has_text=0;
    note_t note=make_note("");
    for(i=optind;i<argc;i++){
        if(argv[i][0]=='#'){
            //Increment pointer to skip past hash
            add_tag(&note, ++argv[i]);
        }else{
            append_note_text(&note, argv[i]);
            append_note_text(&note, " ");
            has_text=1;
        }
    }
    //Change extra space at end of text to NUL
    note.text[strlen(note.text)-1]='\0';
    if(!has_text){
        puts("Can't create note without text.");
        exit(9);
    }
    note.importance=importance;
    add_note(db, note);
}
示例#4
0
/* Send a note to someone on the personal board */
void personal_message (const char *sender, const char *to, const char *subject, const int expire_days, const char *text)
{
	make_note ("Personal", sender, to, subject, expire_days, text);
}