Página 1 de 1

Como criar?

Enviado: 05 Fev 2008 09:47
por apogestal
Como colocar uma musica numa aplicação no clipper.

Enviado: 05 Fev 2008 10:01
por Maligno
Seja bem-vindo ao fórum. :)

Música no Clipper só por meio de algum recurso externo. Há algumas bibliotecas pra isso. Me lembro da CLBC. Não sei onde obter. Mas há também a biblioteca WAPI que, por meio de um utilitário externo, reproduz WAVs através do Windows. Se quiser ver o tópico a respeito, clique aqui. Este link é pra última página do tópico.

Enviado: 05 Fev 2008 11:37
por Clipper
Prezado Colega

Veja esse que eu fiz.

www.phrep.com.br/mp3ren.zip

Usa a LFNLIB e TIMESLICE.

Se precisar delas avisa.

Até logo.

Marcelo

Enviado: 06 Fev 2008 13:01
por gvc
TONE()
Sound a speaker tone for a specified frequency and duration

Syntax

TONE(<nFrequency>, <nDuration>) --> NIL

Arguments

<nFrequency> is a positive numeric value indicating the frequency of the tone to sound.

<nDuration> is a positive numeric value indicating the duration of the tone measured in increments of 1/18 of a second. For example, an <nDuration> value of 18 represents one second.

For both arguments, noninteger values are truncated--not rounded--to their integer portion.

Returns

TONE() always returns NIL.

Description

TONE() is a sound function that indicates various program states to the user. These can be error states, boundary conditions, or the end of a time-consuming process. For example, an error state would sound an error tone before alerting the user with a message or interactive dialog box. A boundary condition might indicate that the user is attempting to cursor past the top or bottom of a column in a TBrowse object. A batch process also might indicate its completion with a sound to alert the user, in case the user has turned away from the screen.

TONE() works by sounding the speaker at the specified frequency for the specified duration. The duration is measured in increments of 1/18 of a second. The frequency is measured in hertz (cycles per second).
Frequencies of less than 20 are inaudible. The table below shows the frequencies of standard musical notes.

Note: TONE() works only on IBM PC and 100% compatible computers

Table of Musical Notes

Pitch Frequency Pitch Frequency

C 130.80 mid C 261.70
C# 138.60 C# 277.20
D 146.80 D 293.70
D# 155.60 D# 311.10
E 164.80 E 329.60
F 174.60 F 349.20
F# 185.00 F# 370.00
G 196.00 G 392.00
G# 207.70 G# 415.30
A 220.00 A 440.00
A# 233.10 A# 466.20
B 246.90 B 493.90
C 523.30


Examples

This example is a beep function that indicates that a batch operation has completed:

FUNCTION DoneBeep
TONE(300, 1)
TONE(100, 1)
TONE(300, 1)
TONE(100, 1)
RETURN NIL

This example is a tone sequence that indicates invalid keystrokes or boundary conditions:

FUNCTION ErrorBeep
TONE(100, 3)
RETURN NIL

Enviado: 06 Fev 2008 13:16
por Maligno
Tone() para tocar música? Acho que não é bem isso que o colega quer. Claro que dá pra "compor" alguma coisa, mas a qualidade deixa a desejar.

Se bem que é espantoso o que dá pra fazer com o "speaker" do micro. Há alguns anos vi um jogo que tinha uma música muito bem feita. Só no alto-falante do PC. Mas o programa era em Assembly. :)

Enviado: 06 Fev 2008 18:33
por gvc
Pois eu tive que colocar o sistema para tocar "parabéns pra vc..." em uma empresa. Não tenho mais os fontes.
Coloquei as freqüências e uma amiga acertou os tempos das notas.
É a diferença do tocador de piano e o pianista.
E olha que eu nem sou tocador de piano.

Enviado: 06 Fev 2008 19:24
por Maligno
Deve ter ficado meio "tosco". Sem ofensa. Tone() é assim mesmo. Mas eu queria ter guardado a música que ouvi pelo beep do PC. Realmente, uma coisa impressionante. Sem exagero: uma obra-prima.

Queria fazer uma regressão psicológica só pra arrancar do fundo do sub-consciente o nome do bendito jogo. :)