Пятница, 19.04.2024, 13:16
| RSS
[SEARCH_TITLE]
[SEARCH_FORM]
[ Новые сообщения · Участники · Правила форума · Поиск · RSS ]
  • Страница 1 из 1
  • 1
Архив - только для чтения
Форум » Программирование » Программирование на языке С, Бейсик и Асемблер » Мелодии как на старых мобильных телефонах .midi в Bascom AVR (Не используя ни каких внешних утройств.)
Мелодии как на старых мобильных телефонах .midi в Bascom AVR
SpaceДата: Понедельник, 24.08.2009, 13:51 | Сообщение # 1








Зарегистрирован 25.12.2007
Группа: Администраторы
Сообщений: 1103
Статус: Offline
Используем только динамик, контроллер и блок стабилизированного питания. Видео и программа ниже. А это собственно место откуда выдернул.
Code
$regfile = "m16def.dat"
$crystal = 16000000
Config Portd.0 = Output
Speaker Alias Portd.0
'
'===============================================================================
'              _______
'      |       |_____|     |
'  PD.0|----|____|----|+ -|----| GND
'      |         |___|      |
'      |    100 Ом   Speaker
'
'===============================================================================
Do
'Celine Dion : : My Heart Will Go On
Sound Speaker , 587 , 1135                    'D2(1/2)
Sound Speaker , 659 , 1011                    'E2(1/2)
Sound Speaker , 880 , 388                    'A3(1/4)
Sound Speaker , 880 , 758                    'A2(1/2)
Sound Speaker , 392 , 850                    'G2(1/4)
Sound Speaker , 185 , 901                    'Fis2(1/8)
Sound Speaker , 659 , 1011                    'E2(1/2)
Sound Speaker , 370 , 901                    'Fis2(1/4)
Sound Speaker , 392 , 850                    'G2(1/4)
Sound Speaker , 740 , 901                    'Fis2(1/2)
Sound Speaker , 330 , 1011                    'E2(1/4)
Sound Speaker , 294 , 1135                    'D2(1/4)
Sound Speaker , 277 , 1203                    'Cis2(1/4)
Sound Speaker , 587 , 1135                    'D2(1/2)
Sound Speaker , 277 , 1203                    'Cis2(1/4)
Sound Speaker , 3952 , 337                    'H3(1/1)
Sound Speaker , 3440 , 388                    'A3(1/1)
Sound Speaker , 1175 , 1135                    'D2(1/1)
Sound Speaker , 659 , 1011                    'E2(1/2)
Sound Speaker , 880 , 388                    'A3(1/4)
Sound Speaker , 880 , 758                    'A2(1/2)
Sound Speaker , 392 , 850                    'G2(1/4)
Sound Speaker , 185 , 901                    'Fis2(1/8)
Sound Speaker , 659 , 1011                    'E2(1/2)
Sound Speaker , 370 , 901                    'Fis2(1/4)
Sound Speaker , 392 , 850                    'G2(1/4)
Sound Speaker , 740 , 901                    'Fis2(1/2)
Sound Speaker , 330 , 1011                    'E2(1/4)
Sound Speaker , 294 , 1135                    'D2(1/4)
Sound Speaker , 277 , 1203                    'Cis2(1/4)
Sound Speaker , 587 , 1135                    'D2(1/2)
Sound Speaker , 277 , 1203                    'Cis2(1/4)
Sound Speaker , 277 , 1203                    'Cis2(1/4)
Sound Speaker , 587 , 1135                    'D2(1/2)
Sound Speaker , 330 , 1011                    'E2(1/4)
Sound Speaker , 740 , 901                    'Fis2(1/2)
Sound Speaker , 659 , 1011                    'E2(1/2)
Sound Speaker , 1175 , 1135                    'D2(1/1)
Wait 2

'Europe :: Final Countdown
Sound Speaker , 124 , 675                    'H2(1/16)
Sound Speaker , 110 , 758                    'A2(1/16)
Sound Speaker , 248 , 675                    'H2(1/8)
Waitms 125                    'P(1/16)
Sound Speaker , 165 , 1011                    'E2(1/8)
Waitms 250                    'P(1/8)
Waitms 125                    'P(1/16)
Sound Speaker , 131 , 637                    'C3(1/16)
Sound Speaker , 124 , 675                    'H2(1/16)
Sound Speaker , 131 , 637                    'C3(1/16)
Waitms 125                    'P(1/16)
Sound Speaker , 124 , 675                    'H2(1/16)
Waitms 125                    'P(1/16)
Sound Speaker , 220 , 758                    'A2(1/8)
Waitms 125                    'P(1/16)
Waitms 250                    'P(1/8)
Sound Speaker , 131 , 637                    'C3(1/16)
Sound Speaker , 124 , 675                    'H2(1/16)
Sound Speaker , 262 , 637                    'C3(1/8)
Waitms 125                    'P(1/16)
Sound Speaker , 165 , 1011                    'E2(1/8)
Waitms 250                    'P(1/8)
Waitms 125                    'P(1/16)
Sound Speaker , 110 , 758                    'A2(1/16)
Sound Speaker , 98 , 850                    'G2(1/16)
Sound Speaker , 110 , 758                    'A2(1/16)
Waitms 125                    'P(1/16)
Sound Speaker , 98 , 850                    'G2(1/16)
Waitms 125                    'P(1/16)
Sound Speaker , 92 , 901                    'Fis2(1/16)
Waitms 125                    'P(1/16)
Sound Speaker , 110 , 758                    'A2(1/16)
Waitms 125                    'P(1/16)
Sound Speaker , 196 , 850                    'G2(1/8)
Wait 2

'Corona :: Rythm of The Night
Sound Speaker , 65 , 1274                    'C2(1/16)
Waitms 125                    'P(1/16)
Sound Speaker , 87 , 954                    'F2(1/16)
Waitms 125                    'P(1/16)
Sound Speaker , 98 , 850                    'G2(1/16)
Waitms 125                    'P(1/16)
Sound Speaker , 87 , 954                    'F2(1/16)
Sound Speaker , 117 , 715                    'Ais2(1/16)
Waitms 125                    'P(1/16)
Sound Speaker , 110 , 758                    'A2(1/16)
Waitms 125                    'P(1/16)
Sound Speaker , 98 , 850                    'G2(1/16)
Waitms 125                    'P(1/16)
Sound Speaker , 110 , 758                    'A2(1/16)
Sound Speaker , 87 , 954                    'F2(1/16)
Waitms 125                    'P(1/16)
Wait 2

'Jean Michel Jarre :: Oxygene 10
Sound Speaker , 131 , 637                    'C3(1/16)
Sound Speaker , 65 , 1274                    'C2(1/16)
Sound Speaker , 92 , 901                    'Fis2(1/16)
Sound Speaker , 65 , 1274                    'C2(1/16)
Sound Speaker , 131 , 637                    'C3(1/16)
Sound Speaker , 65 , 1274                    'C2(1/16)
Sound Speaker , 92 , 901                    'Fis2(1/16)
Sound Speaker , 65 , 1274                    'C2(1/16)
Sound Speaker , 117 , 715                    'Ais2(1/16)
Sound Speaker , 65 , 1274                    'C2(1/16)
Sound Speaker , 92 , 901                    'Fis2(1/16)
Sound Speaker , 65 , 1274                    'C2(1/16)
Sound Speaker , 104 , 803                    'Gis2(1/16)
Sound Speaker , 65 , 1274                    'C2(1/16)
Sound Speaker , 92 , 901                    'Fis2(1/16)
Sound Speaker , 65 , 1274                    'C2(1/16)
Sound Speaker , 98 , 850                    'G2(1/16)
Sound Speaker , 65 , 1274                    'C2(1/16)
Sound Speaker , 92 , 901                    'Fis2(1/16)
Sound Speaker , 65 , 1274                    'C2(1/16)
Sound Speaker , 98 , 850                    'G2(1/16)
Sound Speaker , 65 , 1274                    'C2(1/16)
Sound Speaker , 92 , 901                    'Fis2(1/16)
Sound Speaker , 65 , 1274                    'C2(1/16)
Sound Speaker , 98 , 850                    'G2(1/16)
Sound Speaker , 65 , 1274                    'C2(1/16)
Sound Speaker , 92 , 901                    'Fis2(1/16)
Sound Speaker , 65 , 1274                    'C2(1/16)
Sound Speaker , 98 , 850                    'G2(1/16)
Sound Speaker , 65 , 1274                    'C2(1/16)
Sound Speaker , 92 , 901                    'Fis2(1/16)
Sound Speaker , 65 , 1274                    'C2(1/16)
Wait 2

'Titanic: Theme
Sound Speaker , 131 , 637                    'C3(1/16)
Sound Speaker , 147 , 566                    'D3(1/16)
Sound Speaker , 330 , 483                    'E3(1/8)
Waitms 125                    'P(1/16)
Sound Speaker , 175 , 477                    'F3(1/16)
Sound Speaker , 165 , 483                    'E3(1/16)
Sound Speaker , 147 , 566                    'D3(1/16)
Sound Speaker , 131 , 637                    'C3(1/16)
Sound Speaker , 147 , 566                    'D3(1/16)
Sound Speaker , 392 , 425                    'G3(1/8)
Waitms 125                    'P(1/16)
Sound Speaker , 165 , 483                    'E3(1/16)
Sound Speaker , 147 , 566                    'D3(1/16)
Sound Speaker , 262 , 637                    'C3(1/8)
Waitms 125                    'P(1/16)
Sound Speaker , 110 , 758                    'A2(1/16)
Sound Speaker , 87 , 954                    'F2(1/16)
Sound Speaker , 196 , 850                    'G2(1/8)
Waitms 125                    'P(1/16)
Waitms 125                    'P(1/16)
Sound Speaker , 131 , 637                    'C3(1/16)
Sound Speaker , 147 , 566                    'D3(1/16)
Sound Speaker , 330 , 483                    'E3(1/8)
Waitms 125                    'P(1/16)
Sound Speaker , 175 , 477                    'F3(1/16)
Sound Speaker , 165 , 483                    'E3(1/16)
Sound Speaker , 147 , 566                    'D3(1/16)
Sound Speaker , 131 , 637                    'C3(1/16)
Sound Speaker , 147 , 566                    'D3(1/16)
Sound Speaker , 392 , 425                    'G3(1/8)
Waitms 125                    'P(1/16)
Sound Speaker , 165 , 483                    'E3(1/16)
Sound Speaker , 196 , 425                    'G3(1/16)
Sound Speaker , 440 , 388                    'A3(1/8)
Waitms 125                    'P(1/16)
Sound Speaker , 196 , 425                    'G3(1/16)
Sound Speaker , 165 , 483                    'E3(1/16)
Sound Speaker , 294 , 566                    'D3(1/8)
Wait 2

Loop

Звук нормальный только вот на ятуб почему то загрузилось так, что звук идёт с задержкой так что особо не обращайте на это внимание

 
Bass85Дата: Понедельник, 24.08.2009, 15:02 | Сообщение # 2








Зарегистрирован 12.02.2009
Группа: Опытные
Сообщений: 422
Статус: Offline
Прикольно но для робота scratch_one-s_head
 
юрииДата: Понедельник, 24.08.2009, 15:10 | Сообщение # 3








Язык программированя: Васик
Зарегистрирован 05.03.2009
Группа: Новички
Сообщений: 572
Город: Югорск
Статус: Offline
прикольно!!)
 
SpaceДата: Понедельник, 24.08.2009, 16:17 | Сообщение # 4








Зарегистрирован 25.12.2007
Группа: Администраторы
Сообщений: 1103
Статус: Offline
Quote (Bass85)
Прикольно но для робота

конечно. можно таким образом например сигнализировать о разряде аккумулятора
 
юрииДата: Четверг, 11.03.2010, 18:19 | Сообщение # 5








Язык программированя: Васик
Зарегистрирован 05.03.2009
Группа: Новички
Сообщений: 572
Город: Югорск
Статус: Offline
Супер у мя работает на меге 8 ! smile3 Space, Спасибо за прогу.

Сообщение отредактировал юрии - Четверг, 11.03.2010, 18:19
 
Форум » Программирование » Программирование на языке С, Бейсик и Асемблер » Мелодии как на старых мобильных телефонах .midi в Bascom AVR (Не используя ни каких внешних утройств.)
  • Страница 1 из 1
  • 1
Поиск: