News:

SMF - Just Installed!

Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - sak2005

#1
Quote from: Administrator on July 01, 2015, 03:05:18 PM
Hello,

the attached zipped file seems to be corrupted as it cannot be opened with WinZip.
In any case, the way to choose the input device depends upon the way your program will work and upon your user interface but, in any case, each PC may have its own architecture and installation language so you should give your final user a way to select it without problems: the combobox is usually the best approach but this is obviously your choice.

Kind Regards

Severino Delaurenti
MultiMedia Soft

If I wrote this statement is incorrect.
Suggestions .

LED LEVEL SPEAKERS TRANSPARENT

Option Explicit Off
Option Strict On
Imports System
Imports System.Drawing
Imports System.Windows.Forms
Public Class MainForm
    Private WithEvents lblVuL As Label
    Private WithEvents lblVuR As Label
    Private aSR As AudioSoundRecorder.AudioSoundRecorder
    Private nID As Int16
    Private nIC As Int16
    Private nVol As Int16
    Private hWndVuMeterLeft As IntPtr()
    Private hWndVuMeterRight As IntPtr()
    Public Sub New()
        MyBase.New()
        InitializeComponent()
        Me.Height = 54
        lblVuL = New Label
        lblVuR = New Label
        lblVuL.BackColor = Color.Black
        lblVuL.AutoSize = False
        lblVuL.Size = New Size(300, 10)
        lblVuR.BackColor = Color.Black
        lblVuR.AutoSize = False
        lblVuR.Size = New Size(300, 10)
        lblVuR.Location = New Point(0, 10)
        Me.Controls.AddRange(New Control() {lblVuL, lblVuR})
        aSR = New AudioSoundRecorder.AudioSoundRecorder
        Me.Controls.Add(aSR)
        hWndVuMeterLeft = New IntPtr(1) {}
        hWndVuMeterRight = New IntPtr(1) {}
        nID = 0 'rec device.
        nIC = 4 'rec channel.
        nVol = 5 'rec volume.
        AddHandler aSR.VUMeterValueChange, AddressOf aSR_VUMeterValueChange
    End Sub
    Private Sub MainForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Me.Location = New Point(CInt(My.Computer.Screen.WorkingArea.Right / 2 + 210), CInt(My.Computer.Screen.WorkingArea.Bottom - 20))
        Me.FormBorderStyle = Windows.Forms.FormBorderStyle.None
        Me.TransparencyKey = Color.Black
        aSR.InitRecordingSystem()
        aSR.DisplayVUMeter.Create(lblVuL.Handle)
        hWndVuMeterLeft(0) = CreateVuMeter(lblVuL, AudioSoundRecorder.enumGraphicBarOrientations.GRAPHIC_BAR_ORIENT_HORIZONTAL)
        aSR.DisplayVUMeter.Create(lblVuR.Handle)
        hWndVuMeterRight(0) = CreateVuMeter(lblVuR, AudioSoundRecorder.enumGraphicBarOrientations.GRAPHIC_BAR_ORIENT_HORIZONTAL)
        aSR.EncodeFormats.ForRecording = AudioSoundRecorder.enumEncodingFormats.ENCODING_FORMAT_NOFILE
        aSR.SetInputDeviceChannelVolume(nID, nIC, nVol)
    End Sub
    Private Sub MainForm_Shown(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Shown
        aSR.StartFromDirectSoundDevice(nID, nIC, "")
        MoveControl(Me, lblVuL)
    End Sub
    Private Sub aSR_VUMeterValueChange(ByVal sender As System.Object, ByVal e As AudioSoundRecorder.VUMeterValueChangeEventArgs)
        For i As Integer = 0 To 1
            aSR.GraphicBarsManager.SetValue(hWndVuMeterLeft(i), e.nPeakLeft)
            aSR.GraphicBarsManager.SetValue(hWndVuMeterRight(i), e.nPeakRight)
        Next i
    End Sub
#Region "VUmeter CreatedFields"
    Private Function CreateVuMeter(ByVal ctrlPosition As Label, ByVal nOrientation As AudioSoundRecorder.enumGraphicBarOrientations) As IntPtr
        Dim hWnd As IntPtr = aSR.GraphicBarsManager.Create(Me.Handle, ctrlPosition.Left, ctrlPosition.Top, ctrlPosition.Width, ctrlPosition.Height)
        aSR.GraphicBarsManager.SetRange(hWnd, 0, 32767)
        Dim settings As AudioSoundRecorder.GRAPHIC_BAR_SETTINGS = New AudioSoundRecorder.GRAPHIC_BAR_SETTINGS()
        aSR.GraphicBarsManager.GetGraphicalSettings(hWnd, settings)
        settings.bAutomaticDrop = True
        settings.nOrientation = nOrientation
        aSR.GraphicBarsManager.SetGraphicalSettings(hWnd, settings)
        Return hWnd
    End Function
#End Region
#Region "Drag Move Event Fields"
    Private formLabel As New Form
    Private mouseX As Integer
    Private mouseY As Integer
    Private drag As Boolean
    Private Function MoveControl(ByVal hForm As Form, ByVal hCtl As Label) As System.Drawing.Point
        formLabel = hForm
        lblVuL = hCtl
        lblVuR = hCtl
    End Function
    Private Sub label1_MouseDown(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lblVuL.MouseDown, lblVuR.MouseDown
        drag = True
        mouseX = Control.MousePosition.X - formLabel.Left
        mouseY = Control.MousePosition.Y - formLabel.Top
    End Sub
    Private Sub label1_MouseMove(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lblVuL.MouseMove, lblVuR.MouseMove
        If drag Then
            formLabel.Left = Control.MousePosition.X - mouseX
            formLabel.Top = Control.MousePosition.Y - mouseY
        End If
    End Sub
    Private Sub label1_MouseUp(ByVal sender As Object, ByVal e As EventArgs) Handles lblVuL.MouseUp, lblVuR.MouseUp
        drag = False
    End Sub
    Private Sub Form1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles MyBase.MouseDown
        drag = True
        mouseX = Control.MousePosition.X - Me.Left
        mouseY = Control.MousePosition.Y - Me.Top
    End Sub
    Private Sub Form1_MouseMove(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles MyBase.MouseMove
        If drag Then
            Me.Left = Control.MousePosition.X - mouseX
            Me.Top = Control.MousePosition.Y - mouseY
        End If
    End Sub
    Private Sub Form1_MouseUp(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles MyBase.MouseUp
        drag = False
    End Sub
    Private Sub lblVuL_MouseEnter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lblVuL.MouseEnter
        lblVuL.Cursor = Cursors.Cross
    End Sub
    Private Sub lblVuR_MouseEnter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lblVuR.MouseEnter
        lblVuR.Cursor = Cursors.Cross
    End Sub
    Private Sub lblVuL_MouseLeave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lblVuL.MouseLeave
        lblVuL.Cursor = Cursors.Default
    End Sub
    Private Sub lblVuR_MouseLeave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lblVuR.MouseLeave
        lblVuR.Cursor = Cursors.Default
    End Sub
#End Region
#Region "KeyStroke Events"
    Private bool As Boolean = False
    Private cVol As Integer = 0
    Private Sub MainForm_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown
        Select Case e.KeyCode
            Case Keys.Enter
                aSR.StartFromDirectSoundDevice(nID, nIC, "")
                bool = True
            Case Keys.End
                aSR.Stop()
                bool = False
            Case Keys.Left
                cVol -= 1
                If cVol < 0 Then Return
                aSR.SetInputDeviceChannelVolume(nID, nIC, CShort(cVol))
            Case Keys.Right
                cVol += 1
                If cVol > 100 Then Return
                aSR.SetInputDeviceChannelVolume(nID, nIC, CShort(cVol))
            Case Keys.Escape
                aSR.Stop()
                Me.Close()
        End Select
    End Sub
#End Region
End Class
#2
Quote from: Administrator on June 30, 2015, 03:39:17 PM
Hello,

some small code snippet is available inside the tutorial "How to access BASS library functionalities directly" inside the documentation: the usage of BASS integration requires in any case a certain knowledge about the usage of BASS itself.

Kind Regards

Severino Delaurenti
MultiMedia Soft

I cann't programming about BASS in the DJ studio, because i have not sample codes.
#3
Quote from: Administrator on July 10, 2015, 10:21:34 AM
Hello,

unfortunately I cannot understand what you are speaking about: please, try to be more specific and detailed in your questions.

Kind Regards

Severino Delaurenti
MultiMedia Soft

The Loundness Control is boost and cut Lo-Hi Freq EQ by using button or same as Preset EQ.

eg: if loundness on then boosting low freq = 100Hz (ฺBass) and boosting high freq = 14000Hz(Treble)
#4
Quote from: Administrator on July 11, 2015, 08:46:30 AM
Hello,

probably I still don't have clear what you really need to obtain but, if your need is the availability of an event reporting in real-time the current playback position, as already mentioned some post ago this is not available inside the component. If your need is different, please, try to explain more clearly and with some more detail what you need to obtain.

Kind regards

Severino Delaurenti
MultiMedia Soft

I'm basic programming and bad english. If something goes wrong, apologize.
#5
Quote from: Administrator on July 11, 2015, 12:24:15 AM
Hello,

if you need to change the current sound position the way to go is the SeekSound method.

Kind regards

Severino Delaurenti
MultiMedia Soft

The SeekSound method using with mouse scrolling event method.
It cann't using with timer position events.

EG: my sample codes

Class sample:

Option Explicit Off
Option Strict On
Imports AMP3DJLib
Imports AxAMP3DJLib
Public NotInheritable Class AxDjStudio
    Inherits Object
    Private Shared WithEvents AxAmp3dj1 As AxAmp3dj
    Private Shared sPlayer As Short
    Private Shared sFilename As String
    Shared Sub New()
        AxAmp3dj1 = New AxAmp3dj
        sPlayer = 0
        sFilename = String.Empty
    End Sub
#Region "DjStudio methods Fields"
    Public Shared Function InitSound(ByVal nTotalPlayers As Short, ByVal hWndParent As Integer) As Short
        Return AxAmp3dj1.InitDJSystem(nTotalPlayers, hWndParent, 0, 0, 0, -1)
    End Function
    Public Shared Sub ControlAdd(ByVal win As Control)
        win.Controls.Add(AxAmp3dj1)
        Return
    End Sub
    Public Shared Function LoadSound(ByVal nPlayer As Short, ByVal strFilename As String) As enumErrorCodes
        sFilename = strFilename
        sPlayer = nPlayer
        Return AxAmp3dj1.LoadSound(sPlayer, sFilename)
    End Function
    Public Shared Function PlaySound(ByVal nPlayer As Short) As enumErrorCodes
        sPlayer = nPlayer
        PosTime.Enabled = True
        Return AxAmp3dj1.PlaySound(sPlayer)
    End Function
    Public Shared Function PauseSound(ByVal nPlayer As Short) As enumErrorCodes
        sPlayer = nPlayer
        Return AxAmp3dj1.PauseSound(sPlayer)
    End Function
    Public Shared Function StopSound(ByVal nPlayer As Short) As enumErrorCodes
        sPlayer = nPlayer
        Return AxAmp3dj1.StopSound(sPlayer)
    End Function
    Public Shared Function Duration(ByVal nPlayer As Short) As Integer
        sPlayer = nPlayer
        Return AxAmp3dj1.GetSoundDuration(sPlayer)
    End Function
    Public Shared Function DurationString(ByVal nPlayer As Short, ByVal formats As String) As String
        sPlayer = nPlayer
        Select Case formats
            Case "mm:ss"
                Return AxAmp3dj1.SoundDurationStringGet(sPlayer, enumBoolean.BOOL_FALSE, enumBoolean.BOOL_FALSE, ":", ":", 0, enumBoolean.BOOL_TRUE)
            Case Else
                GoTo LIO
        End Select
LIO:
        Return Nothing
    End Function
    Public Shared Function PositionString(ByVal nPlayer As Short, ByVal formats As String) As String
        sPlayer = nPlayer
        Select Case formats
            Case "mm:ss"
                Return AxAmp3dj1.GetCurrentPosString(sPlayer, enumBoolean.BOOL_FALSE, enumBoolean.BOOL_FALSE)
            Case Else
                GoTo LIO
        End Select
LIO:
        Return Nothing
    End Function
    Public Shared Function MaxPosition(ByVal nPlayer As Short) As Integer
        sPlayer = nPlayer
        Return Duration(sPlayer)
    End Function
    Public Shared Function CurrentPosition(ByVal nPlayer As Short) As Integer
        sPlayer = nPlayer
        Return AxAmp3dj1.GetCurrentPos(sPlayer)
    End Function
    Public Shared Function SetPosition(ByVal nPlayer As Short, ByVal nOffset As Integer) As enumErrorCodes
        sPlayer = nPlayer
        Return AxAmp3dj1.SeekSound(sPlayer, nOffset)
    End Function
    Public Shared Function Status(ByVal nPlayer As Short) As String
        sPlayer = nPlayer
        Dim retStatus As String = Nothing
        Select Case AxAmp3dj1.GetPlayerStatus(sPlayer)
            Case enumStates.SOUND_BUFFERING
                retStatus = "Buffering"
            Case enumStates.SOUND_NONE
                retStatus = "None"
            Case enumStates.SOUND_PAUSED
                retStatus = "Paused"
            Case enumStates.SOUND_PLAYING
                retStatus = "Playing"
            Case enumStates.SOUND_STOPPED
                retStatus = "Stopped"
            Case Else
                Exit Select
        End Select
        Return retStatus
    End Function
    Public Shared Function GetFileInfo() As String
        Dim s As String = FileIO.FileSystem.GetFileInfo(sFilename).FullName.ToString
        Dim parts As String() = s.Split(New Char() {"\"c})
        Dim retPath As String = Nothing
        For Each part As String In parts
            retPath &= part & vbCrLf
        Next part
        Return retPath
    End Function
#End Region
#Region "DjStudio Events Fields"
    Public Shared Sub SyncTimeObject(ByVal hWnd As Form)
        PosTime.SynchronizingObject = hWnd
        PosTime.Enabled = False
    End Sub
    Private Shared Sub PosTime_Elapsed(ByVal sender As Object, ByVal e As EventArgs) Handles PosTime.Elapsed
        Try
            RaiseEvent PositionChange(sender, e)
            If AxAmp3dj1.GetPlayerStatus(sPlayer) = enumStates.SOUND_STOPPED Then
                PosTime.Enabled = False
                RaiseEvent SoundStopping(sender, New EventArgs)
            End If
        Catch
            PosTime.Enabled = False
            RaiseEvent SoundEnding(sender, New EventArgs)
        End Try
    End Sub
    Private Shared WithEvents PosTime As New System.Timers.Timer
    Public Shared Event PositionChange(ByVal sender As Object, ByVal e As EventArgs)
    Public Shared Event SoundEnding As EventHandler
    Public Shared Event SoundStopping As EventHandler
#End Region
End Class


Form sample:

Option Explicit Off
Option Strict On
Imports System
Public Class Form1
    Inherits Form
    Private btnLoad As Button
    Private btnPlay As Button
    Private btnPause As Button
    Private btnStop As Button
    Private lblDuration As Label
    Private lblPosition As Label
    Private lblStatus As Label
    Private lblTag As Label
    Private ofdlg As OpenFileDialog
    Private trackPos As TrackBar
    Private nPlayer As Short
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        If AxDjStudio.InitSound(1, Me.Handle.ToInt32) = 0 Then
            MsgBox("Error! init sound system.")
            Exit Sub
        End If
    End Sub
    Public Sub New()
        MyBase.New()
        Me.StartPosition = FormStartPosition.CenterScreen
        InitializeComponent()
        ofdlg = New OpenFileDialog
        btnLoad = New Button
        btnLoad.Text = "Load"
        btnPlay = New Button
        btnPlay.Text = "Play"
        btnPlay.Location = New Point(0, btnLoad.Height)
        btnPause = New Button
        btnPause.Text = "Pause"
        btnPause.Location = New Point(0, btnLoad.Height + btnPlay.Height)
        btnStop = New Button
        btnStop.Text = "Stop"
        btnStop.Location = New Point(0, btnLoad.Height + btnPlay.Height + btnPause.Height)
        lblDuration = New Label
        lblDuration.Text = Format(0, "00:00")
        lblDuration.AutoSize = True
        lblDuration.Location = New Point(0, 100)
        lblPosition = New Label
        lblPosition.Text = Format(0, "00:00")
        lblPosition.AutoSize = True
        lblPosition.Location = New Point(240, 100)
        lblStatus = New Label
        lblStatus.Text = "Stopped"
        lblStatus.Location = New Point(120, 140)
        lblStatus.AutoSize = True
        lblTag = New Label
        lblTag.Text = "TagInfo:"
        lblTag.Location = New Point(0, 160)
        lblTag.AutoSize = True
        trackPos = New TrackBar
        trackPos.Width = 200
        trackPos.Location = New Point(40, 100)
        Me.Controls.AddRange(New Control() {btnLoad, btnPlay, btnPause, btnStop, lblDuration, lblPosition, lblStatus, lblTag, trackPos})
        AxDjStudio.ControlAdd(Me)
        nPlayer = 0
        AxDjStudio.SyncTimeObject(Me)
        AddHandler btnLoad.Click, AddressOf btnLoad_Click
        AddHandler btnPlay.Click, AddressOf btnPlay_Click
        AddHandler btnPause.Click, AddressOf btnPause_Click
        AddHandler btnStop.Click, AddressOf btnStop_Click
        AddHandler AxDjStudio.PositionChange, AddressOf AxDjStudio_PositionChange
        AddHandler trackPos.Scroll, AddressOf trackPos_Scroll
        AddHandler AxDjStudio.SoundEnding, AddressOf AxDjStudio_SoundEnding
        AddHandler AxDjStudio.SoundStopping, AddressOf AxDjStudio_SoundStopping
    End Sub
    Private Sub AxDjStudio_PositionChange(ByVal sender As Object, ByVal e As EventArgs)
        lblPosition.Text = AxDjStudio.PositionString(nPlayer, "mm:ss")
        trackPos.Value = AxDjStudio.CurrentPosition(nPlayer)
        lblStatus.Text = AxDjStudio.Status(nPlayer)
    End Sub
    Private Sub AxDjStudio_SoundEnding(ByVal sender As Object, ByVal e As EventArgs)
        lblPosition.Text = Format(0, "00:00")
        trackPos.Value = trackPos.Minimum
        lblStatus.Text = "Done"
        MsgBox("Ended")
    End Sub

    Private Sub AxDjStudio_SoundStopping(ByVal sender As Object, ByVal e As EventArgs)
        lblPosition.Text = Format(0, "00:00")
        trackPos.Value = trackPos.Minimum
        MsgBox("Stopped")
    End Sub
    Private Sub trackPos_Scroll(ByVal sender As Object, ByVal e As EventArgs)
        AxDjStudio.SetPosition(nPlayer, trackPos.Value)
    End Sub
    Private Sub btnLoad_Click(ByVal sender As Object, ByVal e As EventArgs)
        If ofdlg.ShowDialog = Windows.Forms.DialogResult.OK Then
            If Not AxDjStudio.LoadSound(nPlayer, ofdlg.FileName) = AMP3DJLib.enumErrorCodes.ERR_NOERROR Then
                MsgBox("Error! file not support.")
                Exit Sub
            End If
            lblDuration.Text = AxDjStudio.DurationString(nPlayer, "mm:ss")
            trackPos.Maximum = AxDjStudio.MaxPosition(nPlayer)
            lblTag.Text = AxDjStudio.GetFileInfo()
        End If
    End Sub
    Private Sub btnPlay_Click(ByVal sender As Object, ByVal e As EventArgs)
        AxDjStudio.PlaySound(nPlayer)
    End Sub
    Private Sub btnPause_Click(ByVal sender As Object, ByVal e As EventArgs)
        AxDjStudio.PauseSound(nPlayer)
    End Sub
    Private Sub btnStop_Click(ByVal sender As Object, ByVal e As EventArgs)
        AxDjStudio.StopSound(nPlayer)
    End Sub
End Class

#6
Quote from: Administrator on July 10, 2015, 12:06:28 PM
Hello,

now it's clear what you need  :)
Effectively there is no event provided for this purpose: the suggestion is to use the same approach used in some of the samples, for example the TestPlayers sample, which create an instance of a timer (where you can select the delay) and, inside the timer's event handler, perform a call to the SoundPositionGet method or, in alternative if you need to display a string of the current position, a call to the SoundPositionStringGet method.

Kind regards

Severino Delaurenti
MultiMedia Soft

I'm not want using Timer1 on the Form1 for changing current sound position. 
But, i wanted Delegate Timer EventHandler and Current Position Change EventHandler.
#7
Quote from: Administrator on July 10, 2015, 10:25:17 AM
Hello,

also in this case I cannot understand what you exactly mean:  please, try to be more specific and detailed in your questions and, by the way, you should at least specify which of our components you are speaking about  :)

Kind Regards

Severino Delaurenti
MultiMedia Soft

The DJ studio has events thread is Song startting event, Song pausing event and Song stopping event , but has not event thread position changing is timer for song current postion.
#8
I want sample codes LoundNess for Sound Tone Control, help me. :)
#9
The Graphic spectrum has linepeak (top led delay) 
But, LED spectrum has not linepeak (top led delay)
I wanted  add led linepeak on led spectrum.
How to you do?!? 
#10
I not found thread code delegate  PositionChanging EventHandler (Timer Position) , Help me :)
#11
How to set input device and set input channel WithOut the ComboBox. :)
#12
I wanted posting some tips sample codes (dj audio + record)
How to posting?, (i like dj studio) thanks  :)
#13
I wanted sample codes , how to using BASS in the DJ studio, Thanks. :)