11
The MUSICAL CPU GUNJAN GUPTA

The Musical CPU

Embed Size (px)

DESCRIPTION

How to generate Music with help of Programming ?

Citation preview

Page 1: The Musical CPU

The MUSICAL CPUGUNJAN GUPTA

Page 2: The Musical CPU

The “musical CPU” uses three carefully designed instruction formats to literally describe the sounds and flow of music by mapping various constructs of music (notes, tempo, etc.) into corresponding specially designed assembly language instructions that encode the desired musical effect.

Page 3: The Musical CPU

Two Common Approaches :

Hardware Based Software Based

Page 4: The Musical CPU

Similarities between Music and CPU

Designing a musical CPU requires mapping various constructs of music into corresponding specially designed assembly language instructions that encode the desired musical effect.

Page 5: The Musical CPU

What is the structure of MUSIC ???

Notes and Tones Note Duration, Tempo, and Control Flow

Page 6: The Musical CPU

INSTRUCTION SET DESIGN

Three music constructs Play Note, Set Tempo, and Jump requires only a 2 bit opcode

Play Note instruction needs three additional fields: the note’s tone, the duration, and the octave.

Set Tempo instruction needs only one additional field: the value of the tempo specified in some units .

Jump instruction needs, at a minimum, a field used to determine the destination address.

Page 7: The Musical CPU

Example :

Note A, Note B, Note C, Note D, Note B

Note A, Note B, Note C, Note D, Note B

Note A, Note B, Note C, Note A, Note B, Note B

Page 8: The Musical CPU

Implementation Technique :

:BEGIN

Play Note A

Play Note B

Play Note C

Jump to ENDING2 after a count of 2

(maxCnt=2, count=2)

Play Note D

Play Note B

Jump to BEGIN after a count of 0

(maxCnt=0, count=0)

:ENDING2

Play Note A

Play Note B

Play Note B

Page 9: The Musical CPU

Instruction Format

Play Note (opcode 00)  

op duration tone octave

2 bits

8 bits 4 bits 2 bits

Set Tempo (opcode 01)  

op tempo unu sed

2 bits

8 bits 6 b its

Jump ( opcode 10)  

op absolute destination address

maxCnt count

2 bits

8 bits 3 bits 3 bits

Page 10: The Musical CPU

Summary

Use Of Numerous Design Principles From

Digital Logic

Theory Of Computation

Computer Organization

Structured Programming

Dealing With The Many Details Related To Designing And Implementing A Device Such As The Musical CPU Represents Issues Not Only From Digital Logic Design, But Also From Computer Science As A Whole, And From The Fine Arts Discipline Of Music.

Page 11: The Musical CPU

Thank YOU